-
Notifications
You must be signed in to change notification settings - Fork 133
/
Copy path_app.tsx
38 lines (37 loc) · 1.13 KB
/
_app.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
// Copyright 2024 the JSR authors. All rights reserved. MIT license.
import { PageProps } from "$fresh/server.ts";
import { asset } from "$fresh/runtime.ts";
import { State } from "../util.ts";
export default async function App(
_req: Request,
{ Component, state }: PageProps<undefined, State>,
) {
const user = await state.userPromise;
if (user instanceof Response) return user;
Object.defineProperty(state, "user", { value: user });
return (
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="preload"
href="/fonts/DMSans/DMSans-Variable.woff2"
as="font"
type="font/woff2"
crossOrigin="true"
/>
<link rel="stylesheet" href={asset("/styles.css")} />
<link rel="stylesheet" href={asset("/gfm.css")} />
<link
rel="icon"
type="image/svg+xml"
href={asset("/logo-square.svg")}
/>
</head>
<body class="dark:bg-jsr-cyan-950 dark:text-white">
<Component />
</body>
</html>
);
}