11import type { PropsWithChildren } from "react" ;
22import { ConfigProvider } from "@resolid/react-ui" ;
33import zhCN from "@resolid/react-ui/locales/zh-CN" ;
4- import { Links , type LinksFunction , Meta , Outlet , Scripts , ScrollRestoration } from "react-router" ;
4+ import { Meta , Outlet , Scripts , ScrollRestoration } from "react-router" ;
55import { ErrorComponent } from "~/components/error-component" ;
66import { RouteProcessBar } from "~/components/route-process-bar" ;
77import { SiteLayout } from "~/components/site-layout" ;
88import { VercelAnalytics } from "~/components/vercel-analytics" ;
99
10- import styles from "~/root.css?url" ;
11-
12- // noinspection JSUnusedGlobalSymbols
13- export const links : LinksFunction = ( ) => [
14- {
15- rel : "stylesheet" ,
16- href : styles ,
17- } ,
18- ] ;
10+ import style from "~/root.css?url" ;
1911
2012// noinspection JSUnusedGlobalSymbols
2113export const meta = ( ) => [
@@ -41,7 +33,7 @@ export const Layout = ({ children }: PropsWithChildren) => {
4133 < link rel = "icon" href = "/favicon.svg" sizes = "any" type = "image/svg+xml" />
4234 < link rel = "apple-touch-icon" href = "/apple-touch-icon.png" />
4335 < Meta />
44- < Links />
36+ < link rel = "stylesheet" href = { style } />
4537 </ head >
4638 < body className = "min-h-screen overflow-y-scroll" >
4739 < RouteProcessBar />
@@ -50,7 +42,7 @@ export const Layout = ({ children }: PropsWithChildren) => {
5042 </ ConfigProvider >
5143 < ScrollRestoration />
5244 < Scripts />
53- { ! ! import . meta. env . VITE_VERCEL_URL && (
45+ { import . meta. env . RESOLID_PLATFORM == "vercel" && (
5446 < VercelAnalytics endpoint = "/growth" scriptSrc = "/growth/script.js" />
5547 ) }
5648 </ body >
0 commit comments