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 MinusIcon from "@/components/icons/MinusIcon";
|
||||
import PlusIcon from "@/components/icons/PlusIcon";
|
||||
import clsx from "clsx";
|
||||
import { motion } from "framer-motion";
|
||||
import Link from "next/link";
|
||||
import { useParams } from "next/navigation";
|
||||
@@ -101,12 +100,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
||||
const foodDetailUrl = `/${name}/${food.id}?category=${food.category}`;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
"flex gap-4 w-full h-full items-center",
|
||||
!isAvailable && "opacity-50",
|
||||
)}
|
||||
>
|
||||
<div className="flex gap-4 w-full h-full items-center">
|
||||
<Link href={foodDetailUrl} className="cursor-pointer">
|
||||
<img
|
||||
className="rounded-xl bg-[#F2F2F9] min-w-28 w-28 max-h-28 object-cover"
|
||||
@@ -159,7 +153,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
||||
<button
|
||||
onClick={handleAddToCart}
|
||||
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 />}
|
||||
<div className="text-sm2 pt-0.5 font-normal text-foreground">
|
||||
@@ -171,7 +165,7 @@ const MenuItem = ({ food }: MenuItemProps) => {
|
||||
<button
|
||||
onClick={handleAddToCart}
|
||||
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" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user