navigate to product description always
This commit is contained in:
@@ -41,8 +41,8 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
|
||||
|
||||
// Handle product click - open dialog on desktop, navigate on mobile/tablet
|
||||
const handleProductClick = (item: Product) => {
|
||||
localStorage.setItem("product", JSON.stringify(item));
|
||||
if (isDesktop) {
|
||||
localStorage.setItem("product", JSON.stringify(item));
|
||||
if (isDesktop) {
|
||||
setIsDialogOpen(true);
|
||||
} else {
|
||||
navigate(`/${restaurantName}/product/${item.id}`);
|
||||
@@ -95,17 +95,19 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
|
||||
}}
|
||||
style={{ marginBottom: "1rem" }}
|
||||
>
|
||||
{!isDesktop && <ImageWithFallback
|
||||
src={category.image || "/default.png"}
|
||||
fallbackSrc="/default.png"
|
||||
alt={category.name}
|
||||
width="100%"
|
||||
height={130}
|
||||
className={styles.categoryMenuItemImage}
|
||||
loadingContainerStyle={{
|
||||
width: "100%",
|
||||
}}
|
||||
/>}
|
||||
{!isDesktop && (
|
||||
<ImageWithFallback
|
||||
src={category.image || "/default.png"}
|
||||
fallbackSrc="/default.png"
|
||||
alt={category.name}
|
||||
width="100%"
|
||||
height={130}
|
||||
className={styles.categoryMenuItemImage}
|
||||
loadingContainerStyle={{
|
||||
width: "100%",
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
<ProTitle
|
||||
style={{
|
||||
fontSize: "1.25rem",
|
||||
@@ -251,7 +253,7 @@ export function MenuList({ data, categoryRefs }: MenuListProps) {
|
||||
height={90}
|
||||
/>
|
||||
|
||||
<AddToCartButton item={item} />
|
||||
<AddToCartButton />
|
||||
|
||||
{items.find((i) => i.id === item.id) && (
|
||||
<Badge
|
||||
|
||||
Reference in New Issue
Block a user