CoastalCommitsPastes/client/app/root-layout-wrapper.tsx

32 lines
796 B
TypeScript
Raw Normal View History

2022-11-09 21:38:05 -05:00
"use client"
2022-11-12 21:39:03 -05:00
import Header from "@components/header"
import Page from "@components/page"
import { Toasts } from "@components/toasts"
2022-11-12 21:39:03 -05:00
import * as RadixTooltip from "@radix-ui/react-tooltip"
import { ThemeProvider } from "@wits/next-themes"
import { SessionProvider } from "next-auth/react"
2022-11-09 21:38:05 -05:00
export function LayoutWrapper({ children }: { children: React.ReactNode }) {
2022-11-09 21:38:05 -05:00
return (
<SessionProvider>
<RadixTooltip.Provider delayDuration={200}>
<Toasts />
<Page>
<ThemeProvider
enableSystem={true}
defaultTheme="dark"
disableTransitionOnChange
cookieName={"drift-theme"}
attribute="data-theme"
enableColorScheme={true}
>
<Header />
</ThemeProvider>
{children}
</Page>
</RadixTooltip.Provider>
</SessionProvider>
2022-11-09 21:38:05 -05:00
)
}