34 lines
948 B
TypeScript
34 lines
948 B
TypeScript
import type { ReactNode } from "react";
|
|
import { Links, Meta, Outlet, Scripts, ScrollRestoration } from "react-router";
|
|
|
|
import type { Route } from "./+types/root";
|
|
import "./app.css";
|
|
|
|
export const links: Route.LinksFunction = () => [
|
|
{ rel: "icon", href: "/favicon.svg", type: "image/svg+xml" },
|
|
// 본문 서체 프리로드 — 프리렌더된 첫 화면의 FOUT 최소화
|
|
{ rel: "preload", href: "/fonts/PretendardVariable.woff2", as: "font", type: "font/woff2", crossOrigin: "anonymous" },
|
|
];
|
|
|
|
export function Layout({ children }: { children: ReactNode }) {
|
|
return (
|
|
<html lang="ko">
|
|
<head>
|
|
<meta charSet="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<Meta />
|
|
<Links />
|
|
</head>
|
|
<body>
|
|
{children}
|
|
<ScrollRestoration />
|
|
<Scripts />
|
|
</body>
|
|
</html>
|
|
);
|
|
}
|
|
|
|
export default function Root() {
|
|
return <Outlet />;
|
|
}
|