feat: start of embeds

This commit is contained in:
TrèsAbhi committed 2024-08-05 12:52:40 -05:00
1 parent f666023bef
commit 6984794be1
23 files changed
+313 -30

No files matched your search

+25 -21
View File
@@ -28,7 +28,7 @@ const robotoFlex = Roboto_Flex({
export default function RootLayout({ children }: RootLayoutProps) {
const pathname = usePathname();
const isEmbed = pathname.split('/')[1] === 'embeds';
const isEmbed = pathname.startsWith('/tools/embed/host');
const isRoot = pathname === '/';
return (
@@ -56,30 +56,34 @@ export default function RootLayout({ children }: RootLayoutProps) {
backgroundColor: isEmbed ? 'transparent' : undefined,
}}
>
<Theme
appearance="dark"
panelBackground="solid"
radius="full"
accentColor="amber"
suppressHydrationWarning
suppressContentEditableWarning
>
<Flex
direction="column"
style={{
minHeight: '100vh',
paddingTop: isEmbed ? undefined : NAVBAR_HEIGHT,
}}
{!isEmbed && (
<Theme
appearance="dark"
panelBackground="solid"
radius="full"
accentColor="amber"
suppressHydrationWarning
suppressContentEditableWarning
>
{!isEmbed && <Navbar />}
<Flex
direction="column"
style={{
minHeight: '100vh',
paddingTop: isEmbed ? undefined : NAVBAR_HEIGHT,
}}
>
{!isEmbed && <Navbar />}
<Checks />
<Checks />
<Suspense fallback={<PageLoader />}>{children}</Suspense>
<Suspense fallback={<PageLoader />}>{children}</Suspense>
{!isEmbed && <Footer />}
</Flex>
</Theme>
{!isEmbed && <Footer />}
</Flex>
</Theme>
)}
{isEmbed && children}
</body>
</html>
</App.Provider>