-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(wallet): rebrand import seed page (#1542)
* feat(wallet): rebrand import mnemonic screen * feat: add showText button and icon * feat: add import mnemonic page * fix: remove header * fix: bring back custom onPaste function and add buttonHtmlType * feat: refine seed page * refactor: update to latest figma changes * fix: remove unnecessary prop after merging * fix: update header Co-authored-by: evavirseda <[email protected]> * feat: update textarea * feat: remove derbis * feat: remove debris after merge * feat: use errorMessage instead of infobox * feat: move function outside html --------- Co-authored-by: JCNoguera <[email protected]> Co-authored-by: JCNoguera <[email protected]>
- Loading branch information
1 parent
d19a51c
commit f097ffa
Showing
7 changed files
with
76 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,37 @@ | ||
// Copyright (c) 2024 IOTA Stiftung | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import { Text } from '_app/shared/text'; | ||
import { useNavigate } from 'react-router-dom'; | ||
|
||
import { | ||
AccountsFormType, | ||
useAccountsFormContext, | ||
} from '../../components/accounts/AccountsFormContext'; | ||
import { ImportSeedForm } from '../../components/accounts/ImportSeedForm'; | ||
import { Heading } from '../../shared/heading'; | ||
import { PageTemplate } from '../../components/PageTemplate'; | ||
|
||
export function ImportSeedPage() { | ||
const navigate = useNavigate(); | ||
const [, setAccountsFormValues] = useAccountsFormContext(); | ||
|
||
function handleOnSubmit({ seed }: { seed: string }) { | ||
setAccountsFormValues({ | ||
type: AccountsFormType.ImportSeed, | ||
seed, | ||
}); | ||
navigate( | ||
`/accounts/protect-account?${new URLSearchParams({ | ||
accountsFormType: AccountsFormType.ImportSeed, | ||
}).toString()}`, | ||
); | ||
} | ||
|
||
return ( | ||
<div className="bg-iota-lightest flex h-full w-full flex-col items-center rounded-20 px-6 py-10 shadow-wallet-content"> | ||
<Text variant="caption" color="steel-dark" weight="semibold"> | ||
Wallet Setup | ||
</Text> | ||
<div className="mt-2.5 text-center"> | ||
<Heading variant="heading1" color="gray-90" as="h1" weight="bold"> | ||
Import Seed | ||
</Heading> | ||
</div> | ||
<div className="mt-6 w-full grow"> | ||
<ImportSeedForm | ||
onSubmit={({ seed }) => { | ||
setAccountsFormValues({ | ||
type: AccountsFormType.ImportSeed, | ||
seed, | ||
}); | ||
navigate( | ||
`/accounts/protect-account?${new URLSearchParams({ | ||
accountsFormType: AccountsFormType.ImportSeed, | ||
}).toString()}`, | ||
); | ||
}} | ||
/> | ||
<PageTemplate title="Import Seed" isTitleCentered showBackButton> | ||
<div className="flex h-full w-full flex-col items-center "> | ||
<div className="w-full grow"> | ||
<ImportSeedForm onSubmit={handleOnSubmit} /> | ||
</div> | ||
</div> | ||
</div> | ||
</PageTemplate> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters