refactor: use z.input for item schema form types
This commit is contained in:
@@ -16,7 +16,7 @@ export const createItemSchema = z.object({
|
||||
}),
|
||||
})
|
||||
|
||||
export type CreateItemFormType = z.infer<typeof createItemSchema>
|
||||
export type CreateItemFormType = z.input<typeof createItemSchema>
|
||||
|
||||
export const updateItemSchema = createItemSchema.extend({
|
||||
id: z.string().min(1, {
|
||||
@@ -24,7 +24,7 @@ export const updateItemSchema = createItemSchema.extend({
|
||||
}),
|
||||
})
|
||||
|
||||
export type UpdateItemFormType = z.infer<typeof updateItemSchema>
|
||||
export type UpdateItemFormType = z.input<typeof updateItemSchema>
|
||||
|
||||
export const getItemByIdSchema = z.object({
|
||||
id: z.string().min(1, {
|
||||
|
||||
Reference in New Issue
Block a user