Merge pull request #11685 from strapi/fix/single-type-delete

Fix single type locale delete
This commit is contained in:
ELABBASSI Hicham 2021-11-26 09:48:37 +01:00 committed by GitHub
commit 8bb0251042
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -163,7 +163,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
try {
trackUsageRef.current('willDeleteEntry', trackerProperty);
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}`));
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}${searchToSend}`));
toggleNotification({
type: 'success',
@ -179,7 +179,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
return Promise.reject(err);
}
},
[slug, toggleNotification]
[slug, toggleNotification, searchToSend]
);
const onDeleteSucceeded = useCallback(() => {