mirror of
https://github.com/hexastack/hexabot
synced 2025-01-22 18:45:57 +00:00
fix: callback function condition
This commit is contained in:
parent
5576b151a8
commit
d7edfdf384
@ -135,12 +135,14 @@ export const Categories = () => {
|
||||
<DeleteDialog
|
||||
{...deleteDialogCtl}
|
||||
callback={async () => {
|
||||
if (selectedCategories.length > 0) {
|
||||
deleteCategories(selectedCategories), setSelectedCategories([]);
|
||||
deleteDialogCtl.closeDialog();
|
||||
}
|
||||
if (deleteDialogCtl?.data) {
|
||||
if (selectedCategories.length > 0) {
|
||||
deleteCategories(selectedCategories), setSelectedCategories([]);
|
||||
deleteDialogCtl.closeDialog();
|
||||
} else {
|
||||
{
|
||||
deleteCategory(deleteDialogCtl.data);
|
||||
deleteDialogCtl.closeDialog();
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user