diff --git a/apps/web/components/dashboard/labels/AddLabelDialog.tsx b/apps/web/components/dashboard/labels/AddLabelDialog.tsx index f49920a..6fd021c 100644 --- a/apps/web/components/dashboard/labels/AddLabelDialog.tsx +++ b/apps/web/components/dashboard/labels/AddLabelDialog.tsx @@ -32,7 +32,7 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { TRPCClientError } from "@trpc/client"; import { useForm } from "react-hook-form"; import { z } from "zod"; -import { HexColorPicker } from "react-colorful"; + import { zLabelSchema } from "@lifetracker/shared/types/labels"; type CreateLabelSchema = z.infer; @@ -47,12 +47,12 @@ export default function AddLabelDialog({ const form = useForm({ resolver: zodResolver(zLabelSchema), defaultValues: { - code: -1, - name: "", - description: "", - color: "#000022", + id: "69", + name: "Fuckdicks", + code: 420, + description: "This shit sucks", + color: "#004400", }, - }); const { mutate, isPending } = api.labels.createLabel.useMutation({ onSuccess: () => { @@ -70,7 +70,7 @@ export default function AddLabelDialog({ } else { toast({ variant: "destructive", - description: "Failed to create user", + description: "Failed to create label", }); } }, @@ -87,15 +87,11 @@ export default function AddLabelDialog({ {children} - New Label + Add User
- mutate(data))}> + mutate(val))}>
- -
- -
)} /> - + ( + + Code + + + + + + )} + /> )} /> + ( + + Color, hope you like hex codes + + + + + + )} + />