-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathroot.tsx
46 lines (41 loc) · 1.02 KB
/
root.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
import {
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import type { LinksFunction } from "@remix-run/node";
import "@fontsource-variable/inter";
// https://fontsource.org/docs/getting-started/preload
import interWoff2 from "@fontsource-variable/inter/files/inter-latin-wght-normal.woff2?url";
import "./tailwind.css";
export const links: LinksFunction = () => [
{
rel: "preload",
as: "font",
href: interWoff2,
type: "font/woff2",
crossOrigin: "anonymous",
},
];
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body className="dark text-pretty bg-neutral-50 dark:bg-neutral-950">
{children}
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
export default function App() {
return <Outlet />;
}