root.tsx 811 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import { cssBundleHref } from "@remix-run/css-bundle";
  2. import type { LinksFunction } from "@remix-run/node";
  3. import {
  4. Links,
  5. LiveReload,
  6. Meta,
  7. Outlet,
  8. Scripts,
  9. ScrollRestoration,
  10. } from "@remix-run/react";
  11. export const links: LinksFunction = () => [
  12. ...(cssBundleHref ? [{ rel: "stylesheet", href: cssBundleHref }] : []),
  13. ];
  14. export function Layout({ children }: { children: React.ReactNode }) {
  15. return (
  16. <html lang="en">
  17. <head>
  18. <meta charSet="utf-8" />
  19. <meta name="viewport" content="width=device-width, initial-scale=1" />
  20. <Meta />
  21. <Links />
  22. </head>
  23. <body>
  24. {children}
  25. <ScrollRestoration />
  26. <Scripts />
  27. <LiveReload />
  28. </body>
  29. </html>
  30. );
  31. }
  32. export default function App() {
  33. return <Outlet />;
  34. }