Skip to content

Commit

Permalink
ui(import): add link to main wallet view to import success page
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Nov 30, 2023
1 parent 3889c0f commit 2c53dcc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions src/components/ImportWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,10 @@ const ImportWalletConfirmation = ({

<div className="d-flex mb-4 gap-4">
<rb.Button variant="none" hidden={isSubmitting} disabled={isSubmitting} onClick={() => onCancel()}>
<Sprite symbol="arrow-left" width="20" height="20" className="me-2" />
{t('global.back')}
<div className="d-flex justify-content-center align-items-center">
<Sprite symbol="arrow-left" width="20" height="20" className="me-2" />
{t('global.back')}
</div>
</rb.Button>
</div>
</rb.Form>
Expand Down Expand Up @@ -604,7 +606,7 @@ export default function ImportWallet({ parentRoute, startWallet }: ImportWalletP
</>
) : (
<>
<PreventLeavingPageByMistake />
{step !== ImportWalletSteps.success && <PreventLeavingPageByMistake />}
{step === ImportWalletSteps.wallet_details && (
<WalletCreationForm
initialValues={createWalletFormValues}
Expand Down Expand Up @@ -664,7 +666,17 @@ export default function ImportWallet({ parentRoute, startWallet }: ImportWalletP
}}
/>
)}
{step === ImportWalletSteps.success && <>{/*empty on purpuse - just a title is shown*/}</>}
{step === ImportWalletSteps.success && (
<div className="d-flex justify-content-center my-4 gap-4">
<Link
className="btn btn-lg btn-dark d-inline-flex justify-content-center align-items-center"
to={routes.wallet}
>
{t('import_wallet.success.text_button_submit')}
<Sprite symbol="arrow-right" width="20" height="20" className="ms-2" />
</Link>
</div>
)}
</>
)}
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@
},
"success": {
"title": "Wallet imported successfully!",
"subtitle": "The rescanning process now searches for your balance. Please be patient, this may take some time."
"subtitle": "The rescanning process started searching for your funds. Please be patient, this may take some time.",
"text_button_submit": "Continue"
},
"error_importing_failed": "Error while importing the wallet. Reason: {{ reason }}"
},
Expand Down

0 comments on commit 2c53dcc

Please sign in to comment.