Skip to content

Commit

Permalink
wip(import): reset alert when navigating to previous step
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Aug 17, 2023
1 parent 5e52654 commit 1800046
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/ImportWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const ImportWalletDetailsForm = ({
<>
<div
className={classNames('mb-2', 'text-danger', {
hidden: submitCount === 0,
'd-none': submitCount === 0,
})}
>
{errors.mnemonicPhrase}
Expand Down Expand Up @@ -340,7 +340,8 @@ export default function ImportWallet({ parentRoute, startWallet }: ImportWalletP
return old
}
})
const previousStep = () =>
const previousStep = () => {
setAlert(undefined)
setStep((old) => {
switch (step) {
case ImportWalletSteps.import_details:
Expand All @@ -351,6 +352,7 @@ export default function ImportWallet({ parentRoute, startWallet }: ImportWalletP
return old
}
})
}

const recoverWallet = useCallback(
async (
Expand Down

0 comments on commit 1800046

Please sign in to comment.