forked from SmartDropLabs/smartdrop-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlayout.tsx
More file actions
70 lines (63 loc) · 1.85 KB
/
Copy pathlayout.tsx
File metadata and controls
70 lines (63 loc) · 1.85 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
import AppShell from "@/components/AppShell/AppShell";
import PageTransition from "@/components/PageTransition/PageTransition";
import type { Metadata, Viewport } from "next";
import { headers } from "next/headers";
import { Inter } from "next/font/google";
import { ColorModeScript } from "@chakra-ui/react";
import { CSP_POLICY } from "../../next.config";
import "./globals.css";
const inter = Inter({ subsets: ["latin"], display: "swap" });
const SITE_NAME = "SmartDrop";
const SITE_TITLE = "SmartDrop — Stellar Liquidity Farming";
const SITE_DESCRIPTION = "Stellar-based liquidity-oriented airdrop experiment";
const INITIAL_COLOR_MODE = "dark";
export const metadata: Metadata = {
title: {
default: SITE_TITLE,
template: "%s · SmartDrop",
},
description: SITE_DESCRIPTION,
openGraph: {
title: SITE_TITLE,
description: SITE_DESCRIPTION,
siteName: SITE_NAME,
type: "website",
},
twitter: {
card: "summary_large_image",
title: SITE_TITLE,
description: SITE_DESCRIPTION,
},
};
export const viewport: Viewport = {
themeColor: "#0b0d0c",
};
const isStaticExport = process.env.NEXT_EXPORT === "true";
export default async function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
let nonce = "";
if (!isStaticExport) {
const headersList = await headers();
nonce = headersList.get("x-nonce") ?? "";
}
return (
<html lang="en" className={inter.className} suppressHydrationWarning>
<head>
<meta httpEquiv="Content-Security-Policy" content={CSP_POLICY} />
<ColorModeScript
nonce={nonce}
initialColorMode={INITIAL_COLOR_MODE}
storageKey="chakra-ui-color-mode"
/>
</head>
<body suppressHydrationWarning>
<AppShell>
<PageTransition>{children}</PageTransition>
</AppShell>
</body>
</html>
);
}