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>
24 lines
815 B
TypeScript
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>
|
|
)
|
|
}
|