Update frontend/src/components/categories/CategoryForm.tsx

This commit is contained in:
Med Marrouchi
2025-05-01 18:19:22 +01:00
committed by GitHub
parent a11d1952c6
commit eec18d40b0

View File

@@ -34,10 +34,10 @@ export const CategoryForm: FC<ComponentFormProps<ICategory>> = ({
rest.onError?.();
toast.error(error || t("message.internal_server_error"));
},
onSuccess: (response: ICategory) => {
onSuccess: (category: ICategory) => {
rest.onSuccess?.();
toast.success(t("message.success_save"));
router.push(`/${RouterType.VISUAL_EDITOR}/flows/${response.id}`);
router.push(`/${RouterType.VISUAL_EDITOR}/flows/${category.id}`);
},
};
const { mutate: createCategory } = useCreate(EntityType.CATEGORY, options);