Files
site/app/global-error.tsx
zeekayandGitHub ea43c5a975 Type lib, scripts, v2, home and app under strict (#8)
* Type scripts under strict

Playwright's API the checks use is declared in host.ts (the package is
the app repo's); caught errors read through why(). tabs-tree.test waits
for the typed tabsTree.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type the shared components under strict

Window globals (__lenis, __hzHold, google) and the two react-dom calls
are declared in components/*.d.ts, since @types/react-dom is not a
dependency and the lockfile is frozen.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type components/v2 under strict

Props, state, refs and DOM events in the 93 v2 files. A2Motion's easing
tuples are as const. Two real bugs: x-archimedes/MaskLines imported a
NoJs that does not exist, and x-hypatia/PinChapters returned the element
from a ref callback, which React 19 reads as a cleanup. AppSheet no
longer sets aria-label to a JSX label.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type components/home under strict

The race, cost and frontier figures, the plan cards, the repository card
and the product stories take Run, Models and Plan types from lib.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Type the hero devices and the app routes under strict

HeroScene and its parts describe hero-scenes.json; the [slug] pages take
params as a Promise, and metadata and viewport carry Next's types.

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Give the integrations previews their Preview type

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk

* Use the bench Card type for the closing cards

Claude-Session: https://claude.ai/code/session_015XYKLix9PSyn6Jw2HWKprk
2026-11-14 01:34:34 -08:00

19 lines
1.3 KiB
TypeScript

'use client';
/* The last resort: if the shell itself (layout, header) fails, this whole document replaces it. Plain HTML and inline
styles only, since nothing else can be trusted to have loaded. */
export default function GlobalError({ reset }: { reset: () => void }) {
return (
<html lang="en">
<body style={{ margin: 0, minHeight: '100svh', display: 'grid', placeItems: 'center', background: '#0a0a0b', color: '#f5f5f7', fontFamily: 'Zen, -apple-system, BlinkMacSystemFont, system-ui, sans-serif' }}>
<main style={{ padding: 24, textAlign: 'center' }}>
<h1 style={{ margin: 0, fontSize: 'clamp(40px, 7vw, 88px)', fontWeight: 560, letterSpacing: '-.05em', lineHeight: 1 }}>Hanzo AI</h1>
<div style={{ display: 'flex', gap: 10, justifyContent: 'center', marginTop: 32 }}>
<button type="button" onClick={() => reset()} style={{ height: 44, padding: '0 22px', borderRadius: 999, border: 0, background: '#f5f5f7', color: '#0a0a0b', font: '500 15px/1 inherit', cursor: 'pointer' }}>Try again</button>
<a href="/" style={{ height: 44, padding: '0 22px', borderRadius: 999, border: '1px solid rgba(255,255,255,.22)', color: '#f5f5f7', font: '500 15px/44px inherit', textDecoration: 'none' }}>Go home</a>
</div>
</main>
</body>
</html>
);
}