mirror of
https://github.com/strapi/strapi.git
synced 2025-06-27 00:41:25 +00:00
fix: dont close modal on error (#19946)
This commit is contained in:
parent
48f5eeadaf
commit
a0da7e73e1
@ -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';
|
||||||
|
@ -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 () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user