Skip to content

Commit

Permalink
deploy : production => bug fix categories
Browse files Browse the repository at this point in the history
[UPDATE]: bug fix categories
  • Loading branch information
mojtaba1180 authored May 31, 2023
2 parents b1d1677 + 32b3f2f commit 7ef5d96
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/pages/admin/categories/add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function CategoriesAdd() {
navigate("/admin/categories");
},
onError: (err) => {
message.error("مشکلی رخ داده است لطفا دقایقی دیگر تلاش کنید");
console.log(err);
}
}
Expand Down Expand Up @@ -80,6 +81,7 @@ function CategoriesAdd() {

<Button
type="primary"
loading={mutation.isLoading}
disabled={mutation.isLoading}
style={{ width: "100%" }}
size="large"
Expand Down
10 changes: 7 additions & 3 deletions src/pages/admin/categories/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ function List() {
message.success("دسته بندی حذف شد");
refetch();
},
onError: () => {
message.error("حذف با مشکل مواجه شد");
refetch();
onError: (err) => {
if (err.response.status !== 404) {
message.error("حذف با مشکل مواجه شد");
refetch();
} else {
window.location.reload();
}
}
}
);
Expand Down

1 comment on commit 7ef5d96

@vercel
Copy link

@vercel vercel bot commented on 7ef5d96 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.