2024-03-25 17:51:11 -04:00
|
|
|
import type { LinksFunction, MetaFunction } from '@remix-run/node'
|
2024-03-25 15:34:11 -04:00
|
|
|
import {
|
2024-03-25 17:51:11 -04:00
|
|
|
Links,
|
|
|
|
|
Meta,
|
|
|
|
|
Outlet,
|
|
|
|
|
Scripts,
|
2024-05-20 14:05:09 -04:00
|
|
|
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'
|
2024-05-01 02:21:54 -04:00
|
|
|
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' },
|
2024-05-20 14:05:09 -04:00
|
|
|
{ name: 'description', content: 'A frontend for the headscale coordination server' },
|
2024-03-25 17:51:11 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export const links: LinksFunction = () => [
|
2024-05-20 14:05:09 -04:00
|
|
|
{ rel: 'stylesheet', href: stylesheet },
|
2024-03-25 17:51:11 -04:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
export function Layout({ children }: { readonly children: React.ReactNode }) {
|
|
|
|
|
return (
|
2024-05-20 14:05:09 -04:00
|
|
|
<html lang="en">
|
2024-03-25 17:51:11 -04:00
|
|
|
<head>
|
2024-05-20 14:05:09 -04:00
|
|
|
<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>
|
2024-05-20 14:05:09 -04:00
|
|
|
<body className="overscroll-none dark:bg-ui-950 dark:text-ui-50">
|
2024-03-25 17:51:11 -04:00
|
|
|
{children}
|
2024-05-20 14:05:09 -04:00
|
|
|
<Toaster />
|
|
|
|
|
<ScrollRestoration />
|
|
|
|
|
<Scripts />
|
2024-03-25 17:51:11 -04:00
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function ErrorBoundary() {
|
2024-05-20 14:05:09 -04:00
|
|
|
return <ErrorPopup />
|
2024-03-25 15:34:11 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default function App() {
|
2024-05-20 14:05:09 -04:00
|
|
|
return <Outlet />
|
2024-03-25 15:34:11 -04:00
|
|
|
}
|