(_: ActionState | null, formData: FormData)
| 45 | const [isEditDialogOpen, setIsEditDialogOpen] = useState(false); |
| 46 | |
| 47 | const handleCreate = async (_: ActionState | null, formData: FormData) => { |
| 48 | const payload = { |
| 49 | name: formData.get("name") as string, |
| 50 | description: formData.get("description") as string, |
| 51 | slug: formData.get("slug") as string, |
| 52 | color: formData.get("color") as string, |
| 53 | icon: formData.get("icon") as string, |
| 54 | }; |
| 55 | return createCategory(null, payload); |
| 56 | }; |
| 57 | |
| 58 | const handleUpdate = async (_: ActionState | null, formData: FormData) => { |
| 59 | const payload = { |
nothing calls this directly
no test coverage detected