forked from ZyntariHQ/Invoisio
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
88 lines (81 loc) · 2.93 KB
/
Copy pathlayout.tsx
File metadata and controls
88 lines (81 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import type React from "react"
import type { Metadata, Viewport } from "next"
import { Inter, Poppins } from "next/font/google"
import { Analytics } from "@vercel/analytics/next"
import { Suspense } from "react"
// import { Navigation } from "@/components/navigation"
import { Footer } from "@/components/footer"
import { ThemeProvider } from "@/components/theme-provider"
import { ServiceWorkerRegister } from "@/components/service-worker-register"
import dynamic from "next/dynamic"
import "./globals.css"
import Providers from "@/app/providers"
import "@coinbase/onchainkit/styles.css"
import { cookies } from "next/headers"
import ThemeCookieSync from "@/components/theme-cookie-sync"
const ClientToaster = dynamic(() => import("@/components/ui/toaster").then(m => m.Toaster), { ssr: false })
const AppNavigation = dynamic(() => import("@/components/navigation").then(m => m.Navigation), { ssr: false })
const inter = Inter({
subsets: ["latin"],
variable: "--font-inter",
display: "swap",
})
const poppins = Poppins({
subsets: ["latin"],
weight: ["400", "500", "600", "700"],
variable: "--font-poppins",
display: "swap",
})
export const metadata: Metadata = {
title: "Invoisio - Smart Invoice Generator for Freelancers and Businesses",
description:
"Create and send professional invoices easily with our intuitive invoice generator — streamline your billing process today.",
generator: "v0.app",
manifest: "/manifest.webmanifest",
icons: {
icon: "/assest/invoisio_logo.svg",
apple: "/assest/invoisio_logo.png",
shortcut: "/assest/invoisio_logo.png",
},
appleWebApp: {
capable: true,
statusBarStyle: "default",
title: "Invoisio",
},
}
export const viewport: Viewport = {
themeColor: "#0ea5e9",
}
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
const themeCookie = cookies().get("theme")?.value
const htmlClass = themeCookie === "dark" ? "dark" : undefined
return (
<html lang="en" className={htmlClass} suppressHydrationWarning>
<head>
<meta name="mobile-web-app-capable" content="yes" />
</head>
<body suppressHydrationWarning className={`font-sans ${inter.variable} ${poppins.variable} antialiased`}>
{/* Boot loader overlay: shows immediately before JS loads */}
<div id="nm-boot-loader" className="nm-boot-overlay" aria-live="polite" aria-busy="true">
<div className="nm-boot-spinner" />
</div>
<Providers>
<ThemeProvider attribute="class" defaultTheme="light" enableSystem disableTransitionOnChange storageKey="theme">
{/* Keep cookie in sync with active theme so SSR class stays correct */}
<ThemeCookieSync />
<AppNavigation />
{children}
<Footer />
<Analytics />
<ServiceWorkerRegister />
<ClientToaster />
</ThemeProvider>
</Providers>
</body>
</html>
)
}