diff --git a/frontend/src/components/routes/event/Settings/Sections/DangerZoneSettings/index.tsx b/frontend/src/components/routes/event/Settings/Sections/DangerZoneSettings/index.tsx index 7344a6885a..3a36d6ee8d 100644 --- a/frontend/src/components/routes/event/Settings/Sections/DangerZoneSettings/index.tsx +++ b/frontend/src/components/routes/event/Settings/Sections/DangerZoneSettings/index.tsx @@ -25,7 +25,8 @@ export const DangerZoneSettings = () => { const [deleteConfirmation, setDeleteConfirmation] = useState(''); const isArchived = event?.status === EventStatus.ARCHIVED; - const isDeleteConfirmed = deleteConfirmation.toLowerCase() === 'delete'; + const deleteConfirmationPhrase = t`delete`; + const isDeleteConfirmed = deleteConfirmation.trim().toLocaleLowerCase() === deleteConfirmationPhrase.toLocaleLowerCase(); const handleDelete = () => { const organizerId = event?.organizer?.id; @@ -98,7 +99,7 @@ export const DangerZoneSettings = () => { {t`Type "delete" to confirm`} setDeleteConfirmation(e.currentTarget.value)} /> diff --git a/frontend/src/components/routes/organizer/Settings/Sections/DangerZoneSettings/index.tsx b/frontend/src/components/routes/organizer/Settings/Sections/DangerZoneSettings/index.tsx index 6d6a76842f..945e0e94de 100644 --- a/frontend/src/components/routes/organizer/Settings/Sections/DangerZoneSettings/index.tsx +++ b/frontend/src/components/routes/organizer/Settings/Sections/DangerZoneSettings/index.tsx @@ -27,7 +27,8 @@ export const DangerZoneSettings = () => { const [deleteConfirmation, setDeleteConfirmation] = useState(''); const isArchived = organizer?.status === OrganizerStatus.ARCHIVED; - const isDeleteConfirmed = deleteConfirmation.toLowerCase() === 'delete'; + const deleteConfirmationPhrase = t`delete`; + const isDeleteConfirmed = deleteConfirmation.trim().toLocaleLowerCase() === deleteConfirmationPhrase.toLocaleLowerCase(); const activeOrganizerCount = organizers?.data?.filter( org => org.status !== OrganizerStatus.ARCHIVED @@ -104,7 +105,7 @@ export const DangerZoneSettings = () => { {t`Type "delete" to confirm`} setDeleteConfirmation(e.currentTarget.value)} />