2022-11-09 21:38:05 -05:00
|
|
|
"use client"
|
|
|
|
|
2022-11-12 21:39:03 -05:00
|
|
|
import Header from "@components/header"
|
2022-11-15 23:50:54 -05:00
|
|
|
import Page from "@components/page"
|
2022-11-28 21:33:06 -05:00
|
|
|
import { Toasts } from "@components/toasts"
|
2022-11-12 21:39:03 -05:00
|
|
|
import * as RadixTooltip from "@radix-ui/react-tooltip"
|
2022-11-29 03:43:04 -05:00
|
|
|
import { ThemeProvider } from "@wits/next-themes"
|
2022-11-28 21:33:06 -05:00
|
|
|
import { Toaster } from "react-hot-toast"
|
2022-11-09 21:38:05 -05:00
|
|
|
|
2022-11-11 22:17:44 -05:00
|
|
|
export function LayoutWrapper({
|
|
|
|
children,
|
2022-11-14 04:28:40 -05:00
|
|
|
signedIn,
|
2022-11-15 23:50:54 -05:00
|
|
|
isAdmin
|
2022-11-11 22:17:44 -05:00
|
|
|
}: {
|
|
|
|
children: React.ReactNode
|
2022-11-12 21:39:03 -05:00
|
|
|
signedIn?: boolean
|
2022-11-14 04:28:40 -05:00
|
|
|
isAdmin?: boolean
|
2022-11-11 22:17:44 -05:00
|
|
|
}) {
|
2022-11-09 21:38:05 -05:00
|
|
|
return (
|
2022-11-12 21:39:03 -05:00
|
|
|
<RadixTooltip.Provider delayDuration={200}>
|
2022-11-28 21:33:06 -05:00
|
|
|
<Toasts />
|
2022-11-15 23:50:54 -05:00
|
|
|
<Page>
|
2022-11-29 03:43:04 -05:00
|
|
|
<ThemeProvider
|
|
|
|
enableSystem={true}
|
|
|
|
defaultTheme="dark"
|
|
|
|
disableTransitionOnChange
|
|
|
|
cookieName={"drift-theme"}
|
|
|
|
attribute="data-theme"
|
|
|
|
enableColorScheme={true}
|
|
|
|
>
|
|
|
|
<Header isAdmin={isAdmin} signedIn={signedIn} />
|
|
|
|
</ThemeProvider>
|
2022-11-15 23:50:54 -05:00
|
|
|
{children}
|
|
|
|
</Page>
|
2022-11-12 21:39:03 -05:00
|
|
|
</RadixTooltip.Provider>
|
2022-11-09 21:38:05 -05:00
|
|
|
)
|
|
|
|
}
|