forked from solana-foundation/explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.tsx
60 lines (56 loc) · 1.9 KB
/
layout.tsx
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
import './scss/theme-dark.scss';
import { ClusterModal } from '@components/ClusterModal';
import { ClusterStatusBanner } from '@components/ClusterStatusButton';
import { MessageBanner } from '@components/MessageBanner';
import { Navbar } from '@components/Navbar';
import { SearchBar } from '@components/SearchBar';
import { ClusterProvider } from '@providers/cluster';
import { MintsProvider } from '@providers/mints';
import { ScrollAnchorProvider } from '@providers/scroll-anchor';
import { Rubik } from 'next/font/google';
import { Metadata } from 'next/types';
export const metadata: Metadata = {
description: 'Inspect transactions, accounts, blocks, and more on the Solana blockchain',
manifest: '/manifest.json',
title: 'Explorer | Solana',
viewport: {
initialScale: 1,
maximumScale: 1,
width: 'device-width',
},
};
const rubikFont = Rubik({
display: 'swap',
subsets: ['latin'],
variable: '--explorer-default-font',
weight: ['300', '400', '700'],
});
export default function RootLayout({
analytics,
children,
}: {
analytics?: React.ReactNode;
children: React.ReactNode;
}) {
return (
<html lang="en" className={`${rubikFont.variable}`}>
<body>
<ScrollAnchorProvider>
<ClusterProvider>
<MintsProvider>
<ClusterModal />
<div className="main-content pb-4">
<Navbar />
<MessageBanner />
<ClusterStatusBanner />
<SearchBar />
{children}
</div>
</MintsProvider>
</ClusterProvider>
</ScrollAnchorProvider>
{analytics}
</body>
</html>
);
}