mirror of
https://github.com/vercel/commerce.git
synced 2025-05-08 10:47:51 +00:00
17 lines
568 B
TypeScript
17 lines
568 B
TypeScript
import { Cart } from "lib/types";
|
|
import { ReactNode } from "react";
|
|
import { Toaster } from "sonner";
|
|
import { CartProvider } from "./cart/cart-context";
|
|
import { Navbar } from "./layout/navbar";
|
|
import { WelcomeToast } from "./welcome-toast";
|
|
|
|
export function Wrapper({ children, currency, cart }: { children: ReactNode, currency: string, cart: Promise<Cart | undefined> }) {
|
|
return <CartProvider cartPromise={cart}>
|
|
<Navbar currency={currency} />
|
|
<main>
|
|
{children}
|
|
<Toaster closeButton />
|
|
<WelcomeToast />
|
|
</main>
|
|
</CartProvider>
|
|
} |