From 18d569dab0e05ee1445be543ca9b1a0e219a2209 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sun, 1 Jun 2025 12:12:10 +0330 Subject: [PATCH] toast --- src/pages/requests/Detail.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/pages/requests/Detail.tsx b/src/pages/requests/Detail.tsx index bf27bea..6bb3742 100644 --- a/src/pages/requests/Detail.tsx +++ b/src/pages/requests/Detail.tsx @@ -84,6 +84,14 @@ const RequestDetail: FC = () => { id, status: 'APPROVED', rejectReason: '' + }, { + onSuccess: () => { + toast.success(t('success')) + window.location.reload() + }, + onError: (error: ErrorType) => { + toast.error(error.response?.data?.error?.message[0]) + } }) } }