portal-dashboard/app/root.tsx

53 lines
1.2 KiB
TypeScript
Raw Permalink Normal View History

2024-03-05 16:56:17 +00:00
import {
Links,
Meta,
Outlet,
Scripts,
2024-03-07 14:05:31 +00:00
ScrollRestoration
} from "@remix-run/react"
2024-03-05 16:56:17 +00:00
2024-03-07 14:05:31 +00:00
import stylesheet from "./tailwind.css?url"
import { LinksFunction } from "@remix-run/node"
2024-03-05 16:56:17 +00:00
// Supports weights 200-800
2024-03-07 14:05:31 +00:00
import "@fontsource-variable/manrope"
import { Refine } from "@refinedev/core"
import routerProvider from "@refinedev/remix-router";
import { authProvider } from "./data/auth-provider"
2024-03-05 16:56:17 +00:00
export const links: LinksFunction = () => [
2024-03-07 14:05:31 +00:00
{ rel: "stylesheet", href: stylesheet }
2024-03-05 16:56:17 +00:00
// { rel: "stylesheet", href: manropeStylesheet },
2024-03-07 14:05:31 +00:00
]
2024-03-05 16:56:17 +00:00
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>
2024-03-07 14:05:31 +00:00
<Refine
authProvider={authProvider}
routerProvider={routerProvider}
>
{children}
</Refine>
2024-03-05 16:56:17 +00:00
<ScrollRestoration />
<Scripts />
</body>
</html>
2024-03-07 14:05:31 +00:00
)
2024-03-05 16:56:17 +00:00
}
export default function App() {
2024-03-07 14:05:31 +00:00
return <Outlet />
2024-03-05 16:56:17 +00:00
}
export function HydrateFallback() {
2024-03-07 14:05:31 +00:00
return <p>Loading...</p>
2024-03-05 16:56:17 +00:00
}