From 44ab9e0ec7c16bc85decfed8a7a59273f555f858 Mon Sep 17 00:00:00 2001 From: Michael Hunteman Date: Sat, 6 Jul 2024 20:18:20 -0700 Subject: Use guest party size as previous party size --- client/src/components/RsvpForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/RsvpForm.tsx b/client/src/components/RsvpForm.tsx index 06c20c0..06669e3 100644 --- a/client/src/components/RsvpForm.tsx +++ b/client/src/components/RsvpForm.tsx @@ -19,7 +19,7 @@ import type { Guest } from '../apiSlice'; function RsvpForm() { const [updateGuest] = useUpdateGuestMutation(); const guest: Guest = useOutletContext(); - const previousPartySize = useRef(0); + const previousPartySize = useRef(guest?.partySize - 1); const { register, -- cgit v1.2.3