-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update layout.tsx file formatting and imports
- Loading branch information
1 parent
cd14dbf
commit 8f3658f
Showing
1 changed file
with
33 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,63 @@ | ||
import "@ui/styles/globals.css"; | ||
import type { Metadata, Viewport } from "next"; | ||
import { Comfortaa, Inter } from "next/font/google"; | ||
import { ThemeProvider } from "@/components/core/theme-provider"; | ||
import { cn } from "ui/lib/utils"; | ||
import { Toaster } from "@ui/components/toaster"; | ||
import SiteHeader from "@/components/core/site-header"; | ||
import { useColorStore } from "@/store/store"; | ||
import ColorStoreInitializer from "./color-store-initializer"; | ||
import PerformanceChecker from "@/components/core/performance-checker"; | ||
import Toolbar from "@/components/core/toobar"; | ||
import StyleSheetInitializer from "./stylesheet-initializer"; | ||
import { getServerColors } from "@/lib/getServerColors"; | ||
import type { Metadata, Viewport } from 'next' | ||
|
||
import { Analytics } from "@vercel/analytics/react"; | ||
import SiteFooter from "@/components/core/site-footer"; | ||
import SiteFooter from '@/components/core/site-footer' | ||
import { ThemeProvider } from '@/components/core/theme-provider' | ||
|
||
const inter = Inter({ subsets: ["latin"], variable: "--font-inter" }); | ||
import { Toaster } from '@/components/ui/sonner' | ||
import '@ui/styles/globals.css' | ||
import { Comfortaa, Inter } from 'next/font/google' | ||
import { cn } from 'ui/lib/utils' | ||
|
||
const inter = Inter({ subsets: ['latin'], variable: '--font-inter' }) | ||
const comfortaa = Comfortaa({ | ||
subsets: ["latin"], | ||
variable: "--font-comfortaa", | ||
}); | ||
subsets: ['latin'], | ||
variable: '--font-comfortaa', | ||
}) | ||
|
||
export const viewport: Viewport = { | ||
width: "device-width", | ||
initialScale: 1.0, | ||
maximumScale: 1.0, | ||
userScalable: false, | ||
}; | ||
width: 'device-width', | ||
viewportFit: 'cover', | ||
} | ||
|
||
export const metadata: Metadata = { | ||
title: { | ||
default: "Fluid Colors", | ||
template: "%s | Fluid Colors", | ||
}, | ||
description: "Next-gen color palette generator", | ||
description: 'Next-gen color palette generator', | ||
metadataBase: new URL(process.env.NEXT_PUBLIC_URL!), | ||
openGraph: { | ||
images: ["/og-default.jpg"], | ||
images: ['/og-default.jpg'], | ||
}, | ||
robots: { | ||
index: false, | ||
follow: true, | ||
nocache: true, | ||
googleBot: { | ||
index: true, | ||
follow: false, | ||
index: true, | ||
'max-image-preview': 'large', | ||
'max-snippet': -1, | ||
'max-video-preview': -1, | ||
noimageindex: true, | ||
"max-video-preview": -1, | ||
"max-image-preview": "large", | ||
"max-snippet": -1, | ||
}, | ||
index: false, | ||
nocache: true, | ||
}, | ||
}; | ||
title: { | ||
default: 'Fluid Colors', | ||
template: '%s | Fluid Colors', | ||
}, | ||
} | ||
|
||
export default async function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
const { baseColors, colorPalettes, colorMode, showReadability } = | ||
await getServerColors(); | ||
useColorStore.setState({ | ||
baseColors, | ||
colorPalettes, | ||
colorMode, | ||
showReadability, | ||
}); | ||
export default async function RootLayout({ children }: { children: React.ReactNode }) { | ||
return ( | ||
<html lang="en" suppressHydrationWarning> | ||
<body className={cn(inter.variable, comfortaa.variable)}> | ||
<div id="skip-nav" /> | ||
<ColorStoreInitializer | ||
{...{ baseColors, colorPalettes, colorMode, showReadability }} | ||
/> | ||
<StyleSheetInitializer /> | ||
<PerformanceChecker /> | ||
<body className={cn(inter.variable, comfortaa.variable, 'transition-bg')}> | ||
<ThemeProvider attribute="class" defaultTheme="system" enableSystem> | ||
<SiteHeader /> | ||
<Toolbar /> | ||
<div id="skip-nav" /> | ||
{children} | ||
<SiteFooter /> | ||
<Toaster /> | ||
</ThemeProvider> | ||
{/* <Analytics /> */} | ||
</body> | ||
</html> | ||
); | ||
) | ||
} |