feat(frontend): add BackLink helper + dedup 3 hand-rolled instances
BackLink: ArrowLeft (14px) + caption-md text-graphite hover:text-primary, instant. Replaces inline Link patterns in EngagementDetailPage (already committed), SimulationFormPage, and TemplateFormPage. Also migrates SimulationFormPage Done/SOC banners to AlertBanner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { FormField, TextArea, TextInput } from '@/components/FormField';
|
||||
import { LoadingState } from '@/components/LoadingState';
|
||||
import { ErrorState } from '@/components/ErrorState';
|
||||
import { ConfirmDialog } from '@/components/ConfirmDialog';
|
||||
import { BackLink } from '@/components/BackLink';
|
||||
import { MitreTechniqueTag, MitreTacticTag } from '@/components/MitreTechniqueTag';
|
||||
import { MitreTechniquePicker } from '@/components/MitreTechniquePicker';
|
||||
import { MitreMatrixModal } from '@/components/MitreMatrixModal';
|
||||
@@ -127,9 +128,7 @@ export function TemplateFormPage(): JSX.Element {
|
||||
<div className="flex flex-col gap-xl">
|
||||
<header className="flex items-start justify-between gap-md">
|
||||
<div className="flex flex-col gap-sm">
|
||||
<Link to="/admin/templates" className="btn-text-link text-[14px]">
|
||||
← Back to templates
|
||||
</Link>
|
||||
<BackLink to="/admin/templates">Back to templates</BackLink>
|
||||
<h1 className="text-[32px] font-medium leading-none">
|
||||
{isNew ? 'New template' : (existing.data?.name ?? 'Edit template')}
|
||||
</h1>
|
||||
|
||||
Reference in New Issue
Block a user