Paul-Home-Remix-Old/app/root.tsx

41 lines
1.1 KiB
TypeScript

import { cssBundleHref } from "@remix-run/css-bundle";
import type { LinksFunction } from "@remix-run/node";
import {
Links,
LiveReload,
Meta,
Outlet,
Scripts,
ScrollRestoration,
} from "@remix-run/react";
import Header from "./components/layout/header";
import Spinner from "./components/common/spinner";
import "./index.css";
export const links: LinksFunction = () => [
...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
{ rel: "stylesheet", href: "https://cdn-font.hyperos.mi.com/font/css?family=MiSans:100,200,300,400,450,500,600,650,700,900:Chinese_Simplify,Latin&display=swap" },
];
export default function App() {
return (
<html lang="zh-cmn-hans">
<head>
<meta charSet="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<Meta />
<Links />
</head>
<body className="font-mi pt-16 bg-orange-50 text-neutral-600">
<Spinner />
<Header />
<Outlet />
<ScrollRestoration />
<LiveReload />
<Scripts />
</body>
</html>
);
}