Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/haotool/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { LazyMotion, MotionConfig } from 'motion/react';
import Header from './Header';
import Footer from './Footer';
import { VercelAnalytics } from '@app/shared/analytics';
import { SpeedInsights } from '@vercel/speed-insights/react';

const loadMotionFeatures = () => import('./motion-features').then((module) => module.default);

Expand Down Expand Up @@ -49,6 +50,7 @@ export default function Layout() {
prefers-reduced-motion。 */}
<ScrollRestoration />
<VercelAnalytics />
<SpeedInsights />
</MotionConfig>
</LazyMotion>
);
Expand Down
2 changes: 2 additions & 0 deletions apps/nihonname/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import { Outlet, useLocation } from 'react-router-dom';
import { HelmetProvider } from '../utils/helmet';
import { VercelAnalytics } from '@app/shared/analytics';
import { SpeedInsights } from '@vercel/speed-insights/react';

export function Layout() {
const location = useLocation();
Expand Down Expand Up @@ -37,6 +38,7 @@ export function Layout() {
<Outlet />
</main>
<VercelAnalytics />
<SpeedInsights />
</HelmetProvider>
);
}
Expand Down
8 changes: 7 additions & 1 deletion apps/papertrade/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { SpeedInsights } from '@vercel/speed-insights/react';
import { routes } from './routes';

const router = createBrowserRouter(routes, {
basename: import.meta.env.BASE_URL || '/',
});

export default function App() {
return <RouterProvider router={router} />;
return (
<>
<RouterProvider router={router} />
<SpeedInsights />
</>
);
}
2 changes: 2 additions & 0 deletions apps/park-keeper/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getStoredLanguage } from '../services/i18n';
import { SITE_CONFIG } from '../../app.config.mjs';
import { UpdatePrompt } from './UpdatePrompt';
import { VercelAnalytics } from '@app/shared/analytics';
import { SpeedInsights } from '@vercel/speed-insights/react';

const APP_NAME = SITE_CONFIG.name;
const CURRENT_YEAR = 2026;
Expand Down Expand Up @@ -37,6 +38,7 @@ export default function Layout() {
{/* 全域掛載:確保 /add 捷徑、/guide、/about 等非 Home 路由也能自動消費 waiting SW(issue #725 pre-release 稽核 C-P0)。 */}
<UpdatePrompt />
<VercelAnalytics />
<SpeedInsights />
{showFooter && (
<footer className="py-4 px-6 text-center border-t border-black/5">
{/* slate-600(R6 review /about 處方):slate-500 on 白 4.76 壓線、slate-400 僅 2.45:1。 */}
Expand Down
2 changes: 2 additions & 0 deletions apps/quake-school/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import { Outlet } from 'react-router-dom';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { VercelAnalytics } from '@app/shared/analytics';
import { SpeedInsights } from '@vercel/speed-insights/react';

const Layout: React.FC = () => {
return (
Expand All @@ -20,6 +21,7 @@ const Layout: React.FC = () => {
<Outlet />
</main>
<VercelAnalytics />
<SpeedInsights />
</HelmetProvider>
);
};
Expand Down
4 changes: 4 additions & 0 deletions apps/ratewise/src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { Footer } from './Footer';
import { useUrlNormalization } from '../hooks/useUrlNormalization';
import { NonCriticalLazyBoundary } from './NonCriticalLazyBoundary';
import { PwaAppReadyBeacon } from './PwaAppReadyBeacon';
import { SpeedInsights } from '@vercel/speed-insights/react';

const DecemberTheme = React.lazy(() => import('../features/calculator/easter-eggs/DecemberTheme'));

Expand Down Expand Up @@ -89,6 +90,9 @@ export function Layout({ children }: { children: React.ReactNode }) {
<DecemberTheme />
</React.Suspense>
)}

{/* Vercel Speed Insights */}
<SpeedInsights />
</HelmetProvider>
</React.StrictMode>
);
Expand Down
2 changes: 2 additions & 0 deletions apps/split-meow/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { CatPlayLayer, type Particle } from './components/CatPlayLayer';
import { makePawParticle, makeCelebrateParticles } from './lib/catPlay';
import { useCurrencyAutoDetect } from './hooks/useCurrencyAutoDetect';
import { VercelAnalytics } from '@app/shared/analytics';
import { SpeedInsights } from '@vercel/speed-insights/react';

function ShareButton() {
const { t } = useTranslation();
Expand Down Expand Up @@ -140,6 +141,7 @@ export default function App() {
<BottomNav />
<UpdatePrompt />
<VercelAnalytics />
<SpeedInsights />

{/* Cat Play Mode overlays */}
{catPlayMode && <CatCompanion />}
Expand Down
4 changes: 3 additions & 1 deletion apps/starpuff/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Phaser from 'phaser';
import { inject } from '@vercel/analytics';
import { injectSpeedInsights } from '@vercel/speed-insights';
import './pwa';
import './style.css';
import { initInstallGuide } from './installGuide';
Expand Down Expand Up @@ -33,6 +34,7 @@ import { isGamePaused, openPauseMenu } from './game/systems/pause';

restoreMutePreference();
inject();
injectSpeedInsights();
// 桌機正置(#817):boot 一次判定掛 sp-desktop class——旋轉殼旁路(CSS transform 免除
// +getShellRotation 恆 none)、虛擬鍵隱藏;Phaser boot 前套用使殼量測即為正置尺寸。
applyDesktopModeClass();
Expand Down Expand Up @@ -460,7 +462,7 @@ if (import.meta.env.DEV || import.meta.env.MODE === 'test') {
state: string | null;
safeSupply: boolean;
}[] = [];
// 場景轉換瞬間(Result/restart)內部系統短暫不可用:防禦回空(審查修復)
// 場景轉換瞬間(Result/restart)內部系統短暫不可用:防禦回空(審查修復)���
try {
for (const child of internals().enemies.getGroup().getChildren()) {
const kind = internals().enemies.kindOf(child);
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,8 @@
"patchedDependencies": {
"vite-react-ssg@0.8.9": "patches/vite-react-ssg@0.8.9.patch"
}
},
"dependencies": {
"@vercel/speed-insights": "^2.0.0"
}
}
35 changes: 35 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading