import {isRouteErrorResponse, Links, Meta, Outlet, Scripts, ScrollRestoration} from 'react-router'; import type {LinksFunction, MetaFunction} from 'react-router'; import {Providers} from '@/app/provider'; import './index.css'; /** * 문서 껍데기. 예전 `index.html` 이 하던 일을 여기서 한다 — * 프레임워크 모드에는 index.html 이 없고, 이 컴포넌트가 부터 그린다. * * ★ 발행 호스트를 여기 문자열로 적지 않는다. `VITE_PUBLISH_HOST` 는 compose 가 루트의 * `SITE_PUBLIC_HOST` 를 흘려보내는 값이다 — 두 곳에 적으면 canonical 과 화면 주소가 * 조용히 갈라진다(AGENTS.md). */ const PUBLISH_HOST = import.meta.env.VITE_PUBLISH_HOST || 'web4ai.o2osolution.ai'; export const ORIGIN = `https://${PUBLISH_HOST}`; export const links: LinksFunction = () => [ {rel: 'icon', type: 'image/svg+xml', href: '/brand/favicon-w4a.svg?v=14'}, // self-host Pretendard 가 어떤 환경에서든 못 뜰 때 한글이 굴림/맑은고딕으로 떨어지지 않게 하는 안전망 {rel: 'preconnect', href: 'https://fonts.googleapis.com'}, {rel: 'preconnect', href: 'https://fonts.gstatic.com', crossOrigin: 'anonymous'}, { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300..900&family=Noto+Serif+KR:wght@400;600;700&display=swap', }, // 7080 아이템(가요 다방·일력·승차권) 전용. 이 셋이 없으면 간판/명조가 고딕으로 떨어져 감성이 사라진다 { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css2?family=Gugi&family=Gowun+Batang:wght@400;700&family=Nanum+Pen+Script&display=swap', }, ]; /** 라우트가 자기 것을 안 내놓을 때의 기본값. 각 페이지는 `meta` 를 export 해 덮어쓴다. */ export const meta: MetaFunction = () => [ {title: 'Web4Ai'}, {property: 'og:site_name', content: 'Web4Ai'}, {property: 'og:locale', content: 'ko_KR'}, {property: 'og:type', content: 'website'}, {name: 'twitter:card', content: 'summary_large_image'}, ]; export function Layout({children}: {children: React.ReactNode}) { return ( {children} ); } export default function Root() { return ( ); } export function ErrorBoundary({error}: {error: unknown}) { const is404 = isRouteErrorResponse(error) && error.status === 404; return (

{is404 ? '404' : '오류'}

{is404 ? '없는 주소입니다.' : '화면을 그리는 중 문제가 생겼습니다.'}

홈으로
); }