Skip to content

Commit

Permalink
code rabbit
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelUnkey committed Jan 8, 2025
1 parent cd6f2a1 commit aab82f3
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ export const CreateKey = ({ apiId, keyAuthId, defaultBytes, defaultPrefix }: Pro
refill:
refill?.amount && refill.interval !== "none"
? {
amount: refill.amount,
refillDay: refill.interval === "daily" ? null : refill.refillDay ?? 1,
}
amount: refill.amount,
refillDay: refill.interval === "daily" ? null : refill.refillDay ?? 1,
}
: undefined,
enabled: true,
});
Expand Down Expand Up @@ -527,8 +527,8 @@ export const CreateKey = ({ apiId, keyAuthId, defaultBytes, defaultPrefix }: Pro
<FormField
control={form.control}
disabled={
form.watch("limit.refill.interval") === "none" ||
form.watch("limit.refill.interval") === undefined
!form.watch("limitEnabled") ||
form.watch("limit.refill.interval") === "none"
}
name="limit.refill.amount"
render={({ field }) => (
Expand All @@ -541,7 +541,7 @@ export const CreateKey = ({ apiId, keyAuthId, defaultBytes, defaultPrefix }: Pro
type="number"
{...field}
value={
form.getValues("limitEnabled") ? field.value : "none"
form.getValues("limitEnabled") ? field.value : "undefined"
}
/>
</FormControl>
Expand Down

0 comments on commit aab82f3

Please sign in to comment.