File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import type { ReactNode } from 'react' ;
44
55import { toast } from 'sonner' ;
6+ import type { z } from 'zod/v4' ;
67
78import { createUser } from '@/prisma/actions/users' ;
89
@@ -19,7 +20,7 @@ import {
1920import { FormDialog } from '@/components/ui/form-dialog' ;
2021import { Input } from '@/components/ui/input' ;
2122
22- type CreateUserFormValues = { email : string ; name ?: string ; isAdmin : boolean } ;
23+ type CreateUserFormValues = z . infer < typeof createUserSchema > ;
2324
2425const defaultValues : CreateUserFormValues = {
2526 email : '' ,
@@ -88,7 +89,7 @@ export function CreateUserDialog({ trigger }: CreateUserDialogProps) {
8889 < FormItem className = "flex flex-row items-center gap-3" >
8990 < FormControl >
9091 < Checkbox
91- checked = { field . value as boolean }
92+ checked = { field . value }
9293 onCheckedChange = { field . onChange }
9394 />
9495 </ FormControl >
You can’t perform that action at this time.
0 commit comments