Skip to content

Commit

Permalink
fix empty infobox
Browse files Browse the repository at this point in the history
  • Loading branch information
evavirseda committed Jan 14, 2025
1 parent d90c78f commit 07cffc1
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
InfoBoxType,
InfoBoxStyle,
} from '@iota/apps-ui-kit';
import { Exclamation } from '@iota/ui-icons';
import { Warning } from '@iota/ui-icons';

const RECOVERY_PHRASE_WORD_COUNT = 24;

Expand Down Expand Up @@ -49,7 +49,7 @@ export function ImportRecoveryPhraseForm({
}: ImportRecoveryPhraseFormProps) {
const {
register,
formState: { errors, isSubmitting, isValid, touchedFields },
formState: { errors, isSubmitting, isValid },
handleSubmit,
setValue,
getValues,
Expand Down Expand Up @@ -125,11 +125,11 @@ 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">
{touchedFields.recoveryPhrase && errors.recoveryPhrase && (
{errors.recoveryPhrase?.message && (
<InfoBox
type={InfoBoxType.Default}
type={InfoBoxType.Error}
supportingText={errors.recoveryPhrase.message}
icon={<Exclamation />}
icon={<Warning />}
style={InfoBoxStyle.Elevated}
/>
)}
Expand Down

0 comments on commit 07cffc1

Please sign in to comment.