Skip to content

Commit e28694e

Browse files
committed
passes typecheck and lint
1 parent 626f5ed commit e28694e

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Claimable.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -608,11 +608,7 @@ const mintFormSchema = z.object({
608608
.min(0, { message: "Invalid tokenId" })
609609
.optional()
610610
.or(z.literal("")),
611-
quantity: z.coerce
612-
.number()
613-
.min(0, { message: "Invalid quantity" })
614-
.optional()
615-
.or(z.literal("")),
611+
quantity: z.coerce.number().min(0, { message: "Invalid quantity" }),
616612
recipient: addressSchema,
617613
});
618614

@@ -625,7 +621,7 @@ function MintNFTSection(props: {
625621
const form = useForm<MintFormValues>({
626622
resolver: zodResolver(mintFormSchema),
627623
values: {
628-
quantity: "",
624+
quantity: 0,
629625
recipient: "",
630626
},
631627
reValidateMode: "onChange",

apps/dashboard/src/app/(dashboard)/(chain)/[chain_id]/[contractAddress]/modules/components/Royalty.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,11 +225,7 @@ export function RoyaltyModuleUI(
225225
}
226226

227227
const royaltyInfoFormSchema = z.object({
228-
tokenId: z.coerce
229-
.number()
230-
.min(0, { message: "Invalid tokenId" })
231-
.optional()
232-
.or(z.literal("")),
228+
tokenId: z.coerce.number().min(0, { message: "Invalid tokenId" }),
233229
recipient: addressSchema,
234230
bps: z
235231
.string()
@@ -245,7 +241,7 @@ function RoyaltyInfoPerTokenSection(props: {
245241
const form = useForm<RoyaltyInfoFormValues>({
246242
resolver: zodResolver(royaltyInfoFormSchema),
247243
values: {
248-
tokenId: "",
244+
tokenId: 0,
249245
recipient: "",
250246
bps: "",
251247
},

0 commit comments

Comments
 (0)