Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda committed Jan 15, 2025
1 parent 5aaa36e commit d1b1d64
Showing 1 changed file with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function ImportRecoveryPhraseForm({
}: ImportRecoveryPhraseFormProps) {
const {
register,
formState: { errors, isSubmitting, isValid },
formState: { errors, isSubmitting, isValid, touchedFields },
handleSubmit,
setValue,
getValues,
Expand Down Expand Up @@ -125,14 +125,15 @@ export function ImportRecoveryPhraseForm({
</div>

<div className="sticky bottom-0 left-0 flex flex-col gap-2.5 bg-neutral-100 pt-sm dark:bg-neutral-6">
{errors.recoveryPhrase?.message && (
<InfoBox
type={InfoBoxType.Error}
supportingText={errors.recoveryPhrase.message}
icon={<Warning />}
style={InfoBoxStyle.Elevated}
/>
)}
{errors?.recoveryPhrase?.message &&
!touchedFields.recoveryPhrase?.every(Boolean) && (
<InfoBox
type={InfoBoxType.Error}
supportingText={errors?.recoveryPhrase?.message}
icon={<Warning />}
style={InfoBoxStyle.Elevated}
/>
)}
<div className="flex flex-row justify-stretch gap-2.5">
{cancelButtonText ? (
<Button
Expand Down

0 comments on commit d1b1d64

Please sign in to comment.