diff --git a/src/features/simulations/components/SimulationForm.tsx b/src/features/simulations/components/SimulationForm.tsx index b3a7268..2612a8e 100644 --- a/src/features/simulations/components/SimulationForm.tsx +++ b/src/features/simulations/components/SimulationForm.tsx @@ -11,8 +11,9 @@ import { Loader2 } from 'lucide-react' import { z } from 'zod' import { Button } from '@/shared/components/ui/button' import { formatTache } from '@/entities/production/lib' -import type { Tache } from '@/entities/production/types' +import type { SujetData, Tache } from '@/entities/production/types' import type { ApiError } from '@/shared/types/api' +import { SujetDisplay } from './SujetDisplay' const textSchema = z.object({ texte: z @@ -38,13 +39,14 @@ function mapCorrectError(err: ApiError | null): string | null { interface Props { tache: Tache + sujet: SujetData | null isSubmitting: boolean error: ApiError | null onSubmit: (texte: string) => void onBack: () => void } -export function SimulationForm({ tache, isSubmitting, error, onSubmit, onBack }: Props) { +export function SimulationForm({ tache, sujet, isSubmitting, error, onSubmit, onBack }: Props) { const [texte, setTexte] = useState('') const [fieldError, setFieldError] = useState(null) @@ -78,6 +80,8 @@ export function SimulationForm({ tache, isSubmitting, error, onSubmit, onBack }:

{formatTache(tache)}

+ + {apiError && (