fix: dont close modal on error (#19946)

This commit is contained in:
Madhuri Sandbhor 2024-04-02 11:08:26 +02:00 committed by GitHub
parent 48f5eeadaf
commit a0da7e73e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 3 deletions

View File

@ -16,7 +16,7 @@ import {
Combobox, Combobox,
ComboboxOption, ComboboxOption,
} from '@strapi/design-system'; } from '@strapi/design-system';
import { formatISO, parse } from 'date-fns'; import { formatISO } from 'date-fns';
import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz'; import { utcToZonedTime, zonedTimeToUtc } from 'date-fns-tz';
import { Formik, Form, useFormikContext } from 'formik'; import { Formik, Form, useFormikContext } from 'formik';
import { useIntl } from 'react-intl'; import { useIntl } from 'react-intl';

View File

@ -897,6 +897,7 @@ const ReleaseDetailsPage = () => {
defaultMessage: 'Release updated.', defaultMessage: 'Release updated.',
}), }),
}); });
toggleEditReleaseModal();
} else if (isAxiosError(response.error)) { } else if (isAxiosError(response.error)) {
// When the response returns an object with 'error', handle axios error // When the response returns an object with 'error', handle axios error
toggleNotification({ toggleNotification({
@ -910,8 +911,6 @@ const ReleaseDetailsPage = () => {
message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }), message: formatMessage({ id: 'notification.error', defaultMessage: 'An error occurred' }),
}); });
} }
toggleEditReleaseModal();
}; };
const handleDeleteRelease = async () => { const handleDeleteRelease = async () => {