root.tsx 991 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import {
  2. Links,
  3. Meta,
  4. Outlet,
  5. Scripts,
  6. ScrollRestoration,
  7. } from "@remix-run/react";
  8. import type { LinksFunction } from "@remix-run/node";
  9. import "./tailwind.css";
  10. export const links: LinksFunction = () => [
  11. { rel: "preconnect", href: "https://fonts.googleapis.com" },
  12. {
  13. rel: "preconnect",
  14. href: "https://fonts.gstatic.com",
  15. crossOrigin: "anonymous",
  16. },
  17. {
  18. rel: "stylesheet",
  19. href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap",
  20. },
  21. ];
  22. export function Layout({ children }: { children: React.ReactNode }) {
  23. return (
  24. <html lang="en">
  25. <head>
  26. <meta charSet="utf-8" />
  27. <meta name="viewport" content="width=device-width, initial-scale=1" />
  28. <Meta />
  29. <Links />
  30. </head>
  31. <body>
  32. {children}
  33. <ScrollRestoration />
  34. <Scripts />
  35. </body>
  36. </html>
  37. );
  38. }
  39. export default function App() {
  40. return <Outlet />;
  41. }