fix: add data to the onSuccess method

This commit is contained in:
yassinedorbozgithub
2025-01-24 09:20:39 +01:00
parent 534f17c809
commit cee8a8e26d

View File

@@ -40,9 +40,9 @@ export const DeleteDialog = <T extends any = string>({
onDeleteSuccess?: (data?: unknown) => void;
}) => {
const { t } = useTranslate();
const onSuccess = () => {
const onSuccess = (data: unknown) => {
setData?.(undefined);
onDeleteSuccess();
onDeleteSuccess(data);
};
const { mutateAsync: deleteOne } = useDelete(entity, {
onError: onDeleteError,