headplane/app/root.tsx

49 lines
1.1 KiB
TypeScript
Raw Normal View History

2024-03-25 17:51:11 -04:00
import type { LinksFunction, MetaFunction } from '@remix-run/node'
import {
2024-03-25 17:51:11 -04:00
Links,
Meta,
Outlet,
Scripts,
ScrollRestoration,
2024-03-25 17:51:11 -04:00
} from '@remix-run/react'
2024-03-29 16:14:35 -04:00
import { ErrorPopup } from '~/components/Error'
import { Toaster } from '~/components/Toaster'
2024-03-25 17:51:11 -04:00
import stylesheet from '~/tailwind.css?url'
export const meta: MetaFunction = () => [
{ title: 'Headplane' },
{ name: 'description', content: 'A frontend for the headscale coordination server' },
2024-03-25 17:51:11 -04:00
]
export const links: LinksFunction = () => [
{ rel: 'stylesheet', href: stylesheet },
2024-03-25 17:51:11 -04:00
]
export function Layout({ children }: { readonly children: React.ReactNode }) {
return (
<html lang="en">
2024-03-25 17:51:11 -04:00
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
2024-03-25 17:51:11 -04:00
</head>
<body className="overscroll-none dark:bg-ui-950 dark:text-ui-50">
2024-03-25 17:51:11 -04:00
{children}
<Toaster />
<ScrollRestoration />
<Scripts />
2024-03-25 17:51:11 -04:00
</body>
</html>
)
}
export function ErrorBoundary() {
return <ErrorPopup />
}
export default function App() {
return <Outlet />
}