-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroot.tsx
61 lines (56 loc) · 1.32 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import {
Link,
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "react-router";
import type {Route} from "./+types/root";
import stylesheet from "./global.css?url";
export const links: Route.LinksFunction = () => [
{rel: "preconnect", href: "https://fonts.googleapis.com"},
{
rel: "preconnect",
href: "https://fonts.gstatic.com",
crossOrigin: "anonymous",
},
{
rel: "stylesheet",
href: "https://fonts.googleapis.com/css2?family=Raleway:wght@400;600;800&display=swap",
},
{rel: "stylesheet", href: stylesheet},
];
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>
{children}
<ScrollRestoration/>
<Scripts/>
</body>
</html>
);
}
export default function App() {
return <Outlet/>;
}
export function ErrorBoundary({error}: Route.ErrorBoundaryProps) {
return (
<main className="errorpage">
<section className="site-error">
<h3 className="">404 – kaardistamata ala</h3>
<p>Asute tundmatutes vetes.</p>
<Link to="/" className="c-btn c-btn--white">
Tagasi rannikule
</Link>
</section>
</main>
);
}