Every client screen focuses its heading when it opens (contract §11.7); the not-found screen did not. Unit and Chromium tests now assert the focus. Found by the V1-1.5 verifier.
22 lines
823 B
TypeScript
22 lines
823 B
TypeScript
import ButtonLink from '@/components/ui/ButtonLink'
|
|
import Card from '@/components/ui/Card'
|
|
import { usePageHeading } from '@/app/usePageHeading'
|
|
import { useT } from '@/i18n/useT'
|
|
|
|
/** The same screen for an unknown id and an id of another workspace (contract §11.1). */
|
|
export default function ClientNotFound() {
|
|
const t = useT()
|
|
const heading = usePageHeading()
|
|
return (
|
|
<Card as="section" className="space-y-3 p-5 sm:p-6">
|
|
<h1 ref={heading} tabIndex={-1} className="outline-none font-serif text-2xl text-[var(--color-ink)]">
|
|
{t('clients.not_found.title')}
|
|
</h1>
|
|
<p className="text-sm text-[var(--color-ink-muted)]">{t('clients.not_found.body')}</p>
|
|
<ButtonLink to="/app/clients" variant="secondary">
|
|
{t('clients.not_found.back')}
|
|
</ButtonLink>
|
|
</Card>
|
|
)
|
|
}
|