chore: optimize LCP images, fix Turbopack warning, update mock images
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import React from "react";
|
||||
import { MenuItem as MenuItemType } from "@/data/menu";
|
||||
import Image from "next/image";
|
||||
|
||||
export function MenuItem({ item, onClick }: { item: MenuItemType; onClick?: () => void }) {
|
||||
export function MenuItem({ item, onClick, priority }: { item: MenuItemType; onClick?: () => void; priority?: boolean }) {
|
||||
return (
|
||||
<div
|
||||
className="py-3.5 border-b last:border-b-0 cursor-pointer transition-colors hover:bg-black/5"
|
||||
@@ -35,9 +36,12 @@ export function MenuItem({ item, onClick }: { item: MenuItemType; onClick?: () =
|
||||
</div>
|
||||
{item.image && (
|
||||
<div className="shrink-0">
|
||||
<img
|
||||
<Image
|
||||
src={item.image}
|
||||
alt={item.name}
|
||||
alt={item.name}
|
||||
width={80}
|
||||
height={80}
|
||||
priority={priority}
|
||||
className="w-20 h-20 object-cover rounded-lg shadow-sm"
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user