This commit is contained in:
@@ -5,7 +5,6 @@ import { useCart } from "@/app/[name]/(Main)/cart/hook/useCart";
|
|||||||
import type { Food, FoodImage } from "@/app/[name]/(Main)/types/Types";
|
import type { Food, FoodImage } from "@/app/[name]/(Main)/types/Types";
|
||||||
import MinusIcon from "@/components/icons/MinusIcon";
|
import MinusIcon from "@/components/icons/MinusIcon";
|
||||||
import PlusIcon from "@/components/icons/PlusIcon";
|
import PlusIcon from "@/components/icons/PlusIcon";
|
||||||
import clsx from "clsx";
|
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { useParams } from "next/navigation";
|
import { useParams } from "next/navigation";
|
||||||
@@ -101,12 +100,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
|||||||
const foodDetailUrl = `/${name}/${food.id}?category=${food.category}`;
|
const foodDetailUrl = `/${name}/${food.id}?category=${food.category}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div className="flex gap-4 w-full h-full items-center">
|
||||||
className={clsx(
|
|
||||||
"flex gap-4 w-full h-full items-center",
|
|
||||||
!isAvailable && "opacity-50",
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<Link href={foodDetailUrl} className="cursor-pointer">
|
<Link href={foodDetailUrl} className="cursor-pointer">
|
||||||
<img
|
<img
|
||||||
className="rounded-xl bg-[#F2F2F9] min-w-28 w-28 max-h-28 object-cover"
|
className="rounded-xl bg-[#F2F2F9] min-w-28 w-28 max-h-28 object-cover"
|
||||||
@@ -159,7 +153,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
|||||||
<button
|
<button
|
||||||
onClick={handleAddToCart}
|
onClick={handleAddToCart}
|
||||||
disabled={!isAvailable}
|
disabled={!isAvailable}
|
||||||
className="inline-flex w-full justify-center items-center gap-2 disabled:pointer-events-none disabled:opacity-40"
|
className="inline-flex w-full justify-center items-center gap-2 disabled:pointer-events-none"
|
||||||
>
|
>
|
||||||
{isAvailable && <PlusIcon />}
|
{isAvailable && <PlusIcon />}
|
||||||
<div className="text-sm2 pt-0.5 font-normal text-foreground">
|
<div className="text-sm2 pt-0.5 font-normal text-foreground">
|
||||||
@@ -171,7 +165,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
|||||||
<button
|
<button
|
||||||
onClick={handleAddToCart}
|
onClick={handleAddToCart}
|
||||||
disabled={!isAvailable}
|
disabled={!isAvailable}
|
||||||
className="bg-container hover:bg-container/60 active:bg-container/30 rounded-sm p-2 transition-colors disabled:opacity-40 disabled:pointer-events-none"
|
className="bg-container hover:bg-container/60 active:bg-container/30 rounded-sm p-2 transition-colors disabled:pointer-events-none"
|
||||||
>
|
>
|
||||||
<PlusIcon className="text-foreground" />
|
<PlusIcon className="text-foreground" />
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user