From bca33a9d7434b8a4d5454166aeb83495447fd3da Mon Sep 17 00:00:00 2001 From: bender Date: Wed, 10 Jun 2026 20:57:29 +0000 Subject: [PATCH] Add src/app/[locale]/layout.tsx --- src/app/[locale]/layout.tsx | 72 +++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 src/app/[locale]/layout.tsx diff --git a/src/app/[locale]/layout.tsx b/src/app/[locale]/layout.tsx new file mode 100644 index 0000000..981388d --- /dev/null +++ b/src/app/[locale]/layout.tsx @@ -0,0 +1,72 @@ +"use client"; + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import ReactLenis from "lenis/react"; +import NavbarLayoutFloatingInline from '@/components/navbar/NavbarLayoutFloatingInline'; +import ProductCart from '@/components/ecommerce/cart/ProductCart'; +import { useParams } from 'next/navigation'; +import { LanguageSwitcher } from '@/components/LanguageSwitcher'; +import { Locale } from '@/lib/i18nConfig'; + +export default function LocaleLayout({ + children, +}: Readonly<{ children: React.ReactNode }>) +{ + const params = useParams(); + const locale = params.locale as Locale; + + return ( + + + + {children} + {/* The ProductCart is a global component, typically rendered within a layout. Moved here. */} +
+ {}} + items={[ + { + id: "item1", name: "Sample Product", price: "99.99", quantity: 1, + imageSrc: "http://img.b2bpic.net/free-photo/modern-equipped-computer-lab_23-2149241207.jpg", imageAlt: "Sample Product Image" + } + ]} + total="99.99" + buttons={[ + { text: "Checkout", onClick: () => console.log("Checkout clicked") } + ]} + /> +
+
+
+ ); +}