Skip to content

Commit

Permalink
fix: duplicate resend button on recovery & verification (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas authored Oct 29, 2024
1 parent cca1a27 commit 87d28da
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const NodeInput = ({
const isPinCodeInput =
(attrs.name === "code" && node.group === "code") ||
(attrs.name === "totp_code" && node.group === "totp")
const isResend = attrs.name === "resend" && node.group === "code"
const isResend = node.meta.label?.id === 1070008

switch (nodeType) {
case UiNodeInputAttributesTypeEnum.Submit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,21 @@ export const DefaultPinCodeInput = ({ attributes }: OryNodeInputProps) => {
const value = watch(name)

return (
<div
className={`grid grid-flow-col grid-cols-${maxlength} gap-3 auto-cols-fr rtl:space-x-reverse`}
<InputOTP
maxLength={maxlength ?? 6}
onChange={handleInputChange}
name={name}
value={value}
>
<InputOTP
maxLength={maxlength ?? 6}
onChange={handleInputChange}
name={name}
value={value}
>
<InputOTPGroup className="w-full space-x-2 justify-between">
{[...Array(elements)].map((_, index) => (
<InputOTPSlot
index={index}
key={index}
className="text-center px-1.5 py-2.5 h-10 w-11 md:w-14 md:h-12 border border-radius border-solid rounded-border-radius-forms border-forms-border-default bg-forms-bg-default"
/>
))}
</InputOTPGroup>
</InputOTP>
</div>
<InputOTPGroup className="w-full space-x-2 justify-between">
{[...Array(elements)].map((_, index) => (
<InputOTPSlot
index={index}
key={index}
className="text-center px-1.5 py-2.5 h-10 w-11 md:w-14 md:h-12 border border-radius border-solid rounded-border-radius-forms border-forms-border-default bg-forms-bg-default"
/>
))}
</InputOTPGroup>
</InputOTP>
)
}

0 comments on commit 87d28da

Please sign in to comment.