Files
free-games-itchio-list/webapp/src/routes/error-preview.tsx
T
poli0981andClaude Opus 5.5 047d918d43 feat: accessibility statement, keyboard/screen-reader/chart/contrast fixes; 4.6.0 (#183) [skip-discuss]
Accessibility pass for the website and the apps (WCAG 2.2 AA target) and the accessibility statement: root ACCESSIBILITY.md + docs/i18n/vi/ACCESSIBILITY.md, the accessibility issue form, a default PR template; focus management, the '/' shortcut switch, chart names and data tables, contrast tokens with a CI check, Windows contrast themes; a docs sync of verified mismatches; version 4.6.0 with the two deps sweeps since 4.5.0 (#176, #182).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 14:16:50 +07:00

24 lines
815 B
TypeScript

import { useParams } from 'react-router'
import { ErrorPage } from '@/components/error-page'
import { useDocumentTitle } from '@/hooks/useDocumentTitle'
import { useT } from '@/lib/i18n'
/**
* Hidden route (`/errors/:code`) for previewing the error pages — not linked
* from the nav. Try `#/errors/403`, `#/errors/500`, `#/errors/999`.
*/
export default function ErrorPreview() {
const { code } = useParams()
const t = useT()
const status = Number(code)
useDocumentTitle(t('titles.error', { code: code ?? '' }))
return (
<div className="flex h-full flex-col">
<p className="px-6 pt-4 text-center text-xs text-muted-foreground">
{t('error.preview.hint', { status: code ?? '?' })}
</p>
<ErrorPage status={Number.isFinite(status) ? status : undefined} />
</div>
)
}