From e449661ee02c47cedb40f0ebf9d9c6c8ab74d459 Mon Sep 17 00:00:00 2001 From: Hermann_Kitio Date: Mon, 20 Apr 2026 23:15:13 +0300 Subject: [PATCH] feat(simulations): afficher la consigne du sujet au-dessus de la textarea --- src/features/simulations/components/SimulationForm.tsx | 8 ++++++-- src/features/simulations/pages/SimulationPage.tsx | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) 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 && (