Replace entire repo content with code from /root/shahikitchen-google/
This commit is contained in:
+8
-3
@@ -13,7 +13,7 @@ import Footer from "@/components/Footer";
|
||||
import { useCart } from "@/components/CartContext";
|
||||
import { useLanguage } from "@/lib/language-context";
|
||||
import { heroBannerSources } from "@/lib/assets";
|
||||
import { menuCategories } from "@/lib/menu-data";
|
||||
import { useMenu } from "@/presentation/providers/menu-provider";
|
||||
import { buildCartLineFromMenuItem } from "@/application/cart/cart-line-builder";
|
||||
import type { MenuItem } from "@/domain/menu/entities";
|
||||
import { getTranslation } from "@/lib/translations";
|
||||
@@ -28,12 +28,17 @@ type HomepageDish = SignatureDish & { filterTag: SignatureFilter | null };
|
||||
|
||||
export default function ShahiKitchenHomepage() {
|
||||
const { addToCart } = useCart();
|
||||
const { categories: menuCategories } = useMenu();
|
||||
const { language } = useLanguage();
|
||||
const t = getTranslation(language);
|
||||
const [menuFilter, setMenuFilter] = useState<SignatureFilter>("All");
|
||||
|
||||
// Lenis smooth scroll
|
||||
// Lenis smooth scroll — desktop only (native scroll feels better on touch devices)
|
||||
useEffect(() => {
|
||||
const isMobile = window.matchMedia('(max-width: 767px)').matches;
|
||||
const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
if (isMobile || prefersReducedMotion) return;
|
||||
|
||||
const lenis = new Lenis({
|
||||
duration: 1.1,
|
||||
easing: (t: number) => Math.min(1, 1.001 * (-Math.pow(2, -10 * t) + 1)),
|
||||
@@ -64,7 +69,7 @@ export default function ShahiKitchenHomepage() {
|
||||
filterTag: getDishFilterTag(item, category.id),
|
||||
}))
|
||||
),
|
||||
[language, t]
|
||||
[language, t, menuCategories]
|
||||
);
|
||||
|
||||
const filtered = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user