MCPcopy Create free account
hub / github.com/code100x/daily-code / handleDeleteCategory

Function handleDeleteCategory

apps/web/components/admin/EditCategories.tsx:53–68  ·  view source on GitHub ↗
(categoryId: string)

Source from the content-addressed store, hash-verified

51 }
52 }
53 async function handleDeleteCategory(categoryId: string) {
54 toast({
55 title: "Deleting category",
56 });
57 try {
58 await deleteCategory(categoryId);
59 router.refresh();
60 toast({
61 title: "Category deleted",
62 });
63 } catch (error) {
64 toast({
65 title: "Error deleting category",
66 });
67 }
68 }
69 return (
70 <Dialog>
71 <DialogTrigger asChild>

Callers 1

EditCategoriesFunction · 0.85

Calls 2

toastFunction · 0.90
deleteCategoryFunction · 0.90

Tested by

no test coverage detected