🐛 Only show error message when defined (#1236)

This commit is contained in:
Luke Vella 2024-08-03 11:03:45 +01:00 committed by GitHub
parent d1cde59d0e
commit 0daa9dc494
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -162,7 +162,7 @@ export const NewParticipantForm = (props: NewParticipantModalProps) => {
<label className="mb-1 text-gray-500">{t("response")}</label>
<VoteSummary votes={props.votes} />
</fieldset>
{formState.errors.root ? (
{formState.errors.root?.message ? (
<FormMessage>{formState.errors.root.message}</FormMessage>
) : null}
<div className="flex gap-2">