From 00fc4972ba45634bfb08bc321438b4f69d9999ce Mon Sep 17 00:00:00 2001 From: Diego Alzate Date: Fri, 21 Jun 2024 10:44:07 +0100 Subject: [PATCH] fix nav bar not showing on initial registration --- packages/berlin/src/pages/Register.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/berlin/src/pages/Register.tsx b/packages/berlin/src/pages/Register.tsx index 338bd9cc..e2b6726c 100644 --- a/packages/berlin/src/pages/Register.tsx +++ b/packages/berlin/src/pages/Register.tsx @@ -594,6 +594,12 @@ function RegisterForm(props: { queryKey: ['registrations', body.id, 'registration-data'], }); + // invalidate user registrations, this is for the 1 event use case + // where the authentication is because you are approved to the event + await queryClient.invalidateQueries({ + queryKey: [props.user?.id, 'registrations'], + }); + props.onRegistrationFormCreate?.(body.id); redirectToNextPage(body.status === 'APPROVED');