-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroot.tsx
43 lines (38 loc) · 1.21 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
import "@mantine/core/styles.css";
import "@mantine/dates/styles.css";
import "dayjs/locale/ja";
import "./app.css";
import { ColorSchemeScript, MantineProvider } from "@mantine/core";
import { DatesProvider } from "@mantine/dates";
import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
import { Favicons } from "./components/Favicon";
import { mantineTheme } from "./config/mantine";
dayjs.extend(customParseFormat);
export function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="ja">
<head>
<meta charSet="utf-8" />
<meta content="width=device-width, initial-scale=1" name="viewport" />
<Favicons />
<Meta />
<Links />
<ColorSchemeScript />
</head>
<body className="min-h-dvh">
<MantineProvider theme={mantineTheme}>
<DatesProvider settings={{ locale: "ja", consistentWeeks: true }}>
{children}
</DatesProvider>
</MantineProvider>
<ScrollRestoration />
<Scripts />
</body>
</html>
);
}
export default function App() {
return <Outlet />;
}