Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Prevent false success screen when participant submission fails (#2849)
Luke Vellaaab178ae8db4
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 430197471..cc21f4230 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -465,6 +465,7 @@"newParticipantFormNoteDescription": "Only the organizer will see this note.","newParticipantFormNoteLabel": "Note for the organizer","newParticipantFormSubmit": "Save availability",+ "newParticipantFormSubmitError": "Your response could not be saved. Please check your connection and try again.","newPassword": "New Password","newPoll": "New Poll","nextMonth": "Next month",diff --git a/apps/web/src/features/poll/components/new-participant-modal.tsx b/apps/web/src/features/poll/components/new-participant-modal.tsxindex 7047a99e3..3edd923c4 100644--- a/apps/web/src/features/poll/components/new-participant-modal.tsx+++ b/apps/web/src/features/poll/components/new-participant-modal.tsx@@ -244,11 +244,15 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {});props.onSubmit?.(newParticipant);} catch (error) {- if (error instanceof TRPCClientError) {- setError("root", {- message: error.message,- });- }+ setError("root", {+ message:+ error instanceof TRPCClientError+ ? error.message+ : t("newParticipantFormSubmitError", {+ defaultValue:+ "Your response could not be saved. Please check your connection and try again.",+ }),+ });}})}className="space-y-4"