chore: remove tracking script from layout

Deleted the inclusion of the external tracking script in the Layout component, likely to improve privacy or simplify the page head.
This commit is contained in:
LIlGG
2025-10-10 11:32:36 +08:00
parent 3af1c30d49
commit 63636fef1f

View File

@@ -32,7 +32,6 @@ import { stripIndents } from './utils/strip-indent';
import 'virtual:uno.css'; import 'virtual:uno.css';
import type { ComponentType } from 'react'; import type { ComponentType } from 'react';
import { useState } from 'react'; import { useState } from 'react';
import { isProduction } from './lib/stores/settings';
// 定义连接设置类型 // 定义连接设置类型
export interface ConnectionSettings { export interface ConnectionSettings {
@@ -119,7 +118,6 @@ const inlineThemeCode = stripIndents`
`; `;
export function Layout({ children }: { children: React.ReactNode }) { export function Layout({ children }: { children: React.ReactNode }) {
const production = useStore(isProduction);
const data = useRouteLoaderData<{ const data = useRouteLoaderData<{
ENV: { OPERATING_ENV: string; MAX_UPLOAD_SIZE_MB: number }; ENV: { OPERATING_ENV: string; MAX_UPLOAD_SIZE_MB: number };
}>('root'); }>('root');
@@ -137,7 +135,6 @@ export function Layout({ children }: { children: React.ReactNode }) {
<Meta /> <Meta />
<Links /> <Links />
<script dangerouslySetInnerHTML={{ __html: inlineThemeCode }} /> <script dangerouslySetInnerHTML={{ __html: inlineThemeCode }} />
{production && <script src="https://track.halo.run/api/script.js" data-site-id="12" defer></script>}
</head> </head>
<body> <body>
<script <script