diff --git a/app/layout.tsx b/app/layout.tsx index b793efe04..c4c4f9773 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -39,7 +39,7 @@ export const metadata = { export default async function RootLayout({ children }: { children: ReactNode }) { const cartId = cookies().get('cartId')?.value; // Don't await the fetch, pass the Promise to the context provider - const cart = getCart(cartId); + const cart = getCart(cartId, 'USD'); return ( diff --git a/app/page.tsx b/app/page.tsx index 7d407ede8..af275eab5 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -9,11 +9,13 @@ export const metadata = { } }; -export default function HomePage() { +export default function HomePage({ searchParams }: { searchParams: { currency?: string } }) { + const currency = searchParams.currency || 'USD'; + return ( <> - - + +