-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathlayout.tsx
More file actions
57 lines (51 loc) · 1.5 KB
/
layout.tsx
File metadata and controls
57 lines (51 loc) · 1.5 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
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { Suspense } from 'react'
import { NetworkProvider } from "@/contexts/NetworkContext";
import { ThemeProvider } from "next-themes";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
// Prevent hydration errors from extensions - adding attributes to the body
export const metadata: Metadata = {
metadataBase: new URL('https://localhost:3000'),
title: 'Escrow Data Viewer',
description: 'View detailed information about escrow contracts on the Stellar blockchain.',
}
// Suppress hydration warnings in development
const customBodyProps = process.env.NODE_ENV === 'development'
? { suppressHydrationWarning: true }
: {}
export default function RootLayout({
children,
}: {
children: React.ReactNode
}) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
{...customBodyProps}
>
<Suspense fallback={<div>Loading...</div>}>
<ThemeProvider
attribute="class"
defaultTheme="system"
enableSystem
disableTransitionOnChange
>
<NetworkProvider>
{children}
</NetworkProvider>
</ThemeProvider>
</Suspense>
</body>
</html>
)
}