Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

399 new group registrations shouldnt go to holding page #436

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions packages/berlin/src/pages/Register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ function Register() {
mode={form.mode}
event={event}
groupId={groupId}
groupCategoryParam={groupCategoryParam}
/>
);
})}
Expand Down Expand Up @@ -252,6 +253,7 @@ function RegisterForm(props: {
groupId?: string;
show: boolean;
mode: 'edit' | 'create';
groupCategoryParam: string | null;
}) {
const navigate = useNavigate();
const queryClient = useQueryClient();
Expand Down Expand Up @@ -301,7 +303,11 @@ function RegisterForm(props: {
await queryClient.invalidateQueries({
queryKey: ['registration', 'data'],
});
navigate(`/events/${props.event?.id}/holding`);
if (props.groupCategoryParam) {
return;
} else {
navigate(`/events/${props.event?.id}/holding`);
}
} else {
toast.error('Failed to save registration, please try again');
}
Expand All @@ -323,7 +329,11 @@ function RegisterForm(props: {
await queryClient.invalidateQueries({
queryKey: [props.registrationId, 'registration', 'data'],
});
navigate(`/events/${props.event?.id}/holding`);
if (props.groupCategoryParam) {
return;
} else {
navigate(`/events/${props.event?.id}/holding`);
}
} else {
toast.error('Failed to update registration, please try again');
}
Expand Down
Loading