(_: ActionState | null, formData: FormData)
| 56 | }; |
| 57 | |
| 58 | const handleUpdate = async (_: ActionState | null, formData: FormData) => { |
| 59 | const payload = { |
| 60 | id: selectedCategory?.id as string, |
| 61 | name: formData.get("name") as string, |
| 62 | description: formData.get("description") as string, |
| 63 | slug: formData.get("slug") as string, |
| 64 | color: formData.get("color") as string, |
| 65 | icon: formData.get("icon") as string, |
| 66 | }; |
| 67 | return updateCategory(null, payload); |
| 68 | }; |
| 69 | |
| 70 | const handleDelete = async (_: ActionState | null, formData: FormData) => { |
| 71 | return deleteCategory(null, { id: formData.get("id") as string }); |
nothing calls this directly
no test coverage detected