mirror of
https://github.com/strapi/strapi.git
synced 2025-11-17 10:38:30 +00:00
Fix single type local delete
Signed-off-by: HichamELBSI <elabbassih@gmail.com>
This commit is contained in:
parent
32286aa049
commit
51ae148e90
@ -163,7 +163,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
try {
|
try {
|
||||||
trackUsageRef.current('willDeleteEntry', trackerProperty);
|
trackUsageRef.current('willDeleteEntry', trackerProperty);
|
||||||
|
|
||||||
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}`));
|
const { data } = await axiosInstance.delete(getRequestUrl(`${slug}${searchToSend}`));
|
||||||
|
|
||||||
toggleNotification({
|
toggleNotification({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@ -179,7 +179,7 @@ const SingleTypeFormWrapper = ({ allLayoutData, children, slug }) => {
|
|||||||
return Promise.reject(err);
|
return Promise.reject(err);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[slug, toggleNotification]
|
[slug, toggleNotification, searchToSend]
|
||||||
);
|
);
|
||||||
|
|
||||||
const onDeleteSucceeded = useCallback(() => {
|
const onDeleteSucceeded = useCallback(() => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user