MCPcopy Create free account
hub / github.com/9d8dev/directory / handleCreate

Function handleCreate

components/admin/category-manager.tsx:47–56  ·  view source on GitHub ↗
(_: ActionState | null, formData: FormData)

Source from the content-addressed store, hash-verified

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 = {

Callers

nothing calls this directly

Calls 1

createCategoryFunction · 0.90

Tested by

no test coverage detected