From 49affe118b2bc5d46654b1ac3f78f42bd58bfa1d Mon Sep 17 00:00:00 2001 From: Nathan Lamy Date: Wed, 25 Feb 2026 00:24:42 +0100 Subject: [PATCH] fix: show display name --- app/components/settings/match-student.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/app/components/settings/match-student.tsx b/app/components/settings/match-student.tsx index 4f3f922..eab0553 100644 --- a/app/components/settings/match-student.tsx +++ b/app/components/settings/match-student.tsx @@ -3,10 +3,9 @@ import { Combobox } from "~/components/combobox"; import { Label } from "~/components/ui/label"; import { getStudentMatch, mergeStudent } from "~/lib/api"; -type Student = { +type PartialStudent = { id: string; - fistName: string; - lastName: string; + fullName: string; }; export function MatchStudent({ @@ -16,7 +15,7 @@ export function MatchStudent({ }: { firstName: string; lastName: string; - onSuccess: (student: Student) => void; + onSuccess: (student: PartialStudent) => void; }) { const [pastClasses, setPastClasses] = useState< { value: string; label: string }[] @@ -31,7 +30,7 @@ export function MatchStudent({ const [pastClassName, setPastClassName] = useState(""); const [isLoading, setIsLoading] = useState(false); - const [matchedStudent, setMatchedStudent] = useState(null); + const [matchedStudent, setMatchedStudent] = useState(null); useEffect(() => { if (pastClassName) { @@ -73,8 +72,7 @@ export function MatchStudent({ {matchedStudent && (

- Correspondance trouvée: {matchedStudent.fistName}{" "} - {matchedStudent.lastName} + Correspondance trouvée: {matchedStudent.fullName}