mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Small clean ups of onboarding flow v2 changes (#12349)
This commit is contained in:
parent
aa070edd3f
commit
859b80955b
@ -58,7 +58,6 @@ const ONBOARDING_CONFIRM_SRP_ROUTE = '/onboarding/confirm-recovery-phrase';
|
||||
const ONBOARDING_CREATE_PASSWORD_ROUTE = '/onboarding/create-password';
|
||||
const ONBOARDING_COMPLETION_ROUTE = '/onboarding/completion';
|
||||
const ONBOARDING_UNLOCK_ROUTE = '/onboarding/unlock';
|
||||
const ONBOARDING_GET_STARTED_ROUTE = '/onboarding/get-started';
|
||||
const ONBOARDING_HELP_US_IMPROVE_ROUTE = '/onboarding/help-us-improve';
|
||||
const ONBOARDING_IMPORT_WITH_SRP_ROUTE =
|
||||
'/onboarding/import-with-recovery-phrase';
|
||||
@ -216,7 +215,6 @@ export {
|
||||
SWAPS_ERROR_ROUTE,
|
||||
SWAPS_MAINTENANCE_ROUTE,
|
||||
ONBOARDING_ROUTE,
|
||||
ONBOARDING_GET_STARTED_ROUTE,
|
||||
ONBOARDING_HELP_US_IMPROVE_ROUTE,
|
||||
ONBOARDING_CREATE_PASSWORD_ROUTE,
|
||||
ONBOARDING_IMPORT_WITH_SRP_ROUTE,
|
||||
|
@ -4,9 +4,9 @@ import { Redirect } from 'react-router-dom';
|
||||
import {
|
||||
DEFAULT_ROUTE,
|
||||
ONBOARDING_COMPLETION_ROUTE,
|
||||
ONBOARDING_GET_STARTED_ROUTE,
|
||||
ONBOARDING_UNLOCK_ROUTE,
|
||||
LOCK_ROUTE,
|
||||
ONBOARDING_WELCOME,
|
||||
} from '../../../helpers/constants/routes';
|
||||
import {
|
||||
getCompletedOnboarding,
|
||||
@ -34,7 +34,7 @@ export default function OnboardingFlowSwitch() {
|
||||
}
|
||||
|
||||
if (!isInitialized) {
|
||||
return <Redirect to={{ pathname: ONBOARDING_GET_STARTED_ROUTE }} />;
|
||||
return <Redirect to={{ pathname: ONBOARDING_WELCOME }} />;
|
||||
}
|
||||
|
||||
return <Redirect to={{ pathname: ONBOARDING_UNLOCK_ROUTE }} />;
|
||||
|
@ -11,11 +11,11 @@ import {
|
||||
JUSTIFY_CONTENT,
|
||||
FONT_WEIGHT,
|
||||
} from '../../../helpers/constants/design-system';
|
||||
import { INITIALIZE_END_OF_FLOW_ROUTE } from '../../../helpers/constants/routes';
|
||||
import {
|
||||
ThreeStepProgressBar,
|
||||
threeStepStages,
|
||||
} from '../../../components/app/step-progress-bar';
|
||||
import { ONBOARDING_COMPLETION_ROUTE } from '../../../helpers/constants/routes';
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import RecoveryPhraseChips from './recovery-phrase-chips';
|
||||
|
||||
@ -86,7 +86,7 @@ export default function ConfirmRecoveryPhrase({ secretRecoveryPhrase = '' }) {
|
||||
type="primary"
|
||||
className="recovery-phrase__footer--button"
|
||||
onClick={() => {
|
||||
history.push(INITIALIZE_END_OF_FLOW_ROUTE);
|
||||
history.push(ONBOARDING_COMPLETION_ROUTE);
|
||||
}}
|
||||
disabled={!matching}
|
||||
>
|
||||
|
@ -76,15 +76,21 @@
|
||||
align-items: center;
|
||||
|
||||
&--button {
|
||||
@include H6;
|
||||
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
display: flex;
|
||||
justify-content: space-evenly;
|
||||
width: 40%;
|
||||
width: 32%;
|
||||
color: $primary-blue;
|
||||
cursor: pointer;
|
||||
margin-bottom: 24px;
|
||||
|
||||
svg {
|
||||
width: 15px;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: $ui-black;
|
||||
background-color: transparent;
|
||||
|
@ -7,7 +7,7 @@ import Typography from '../../../components/ui/typography';
|
||||
import Copy from '../../../components/ui/icon/copy-icon.component';
|
||||
import { useCopyToClipboard } from '../../../hooks/useCopyToClipboard';
|
||||
import { useI18nContext } from '../../../hooks/useI18nContext';
|
||||
import { INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE } from '../../../helpers/constants/routes';
|
||||
import { ONBOARDING_CONFIRM_SRP_ROUTE } from '../../../helpers/constants/routes';
|
||||
import {
|
||||
TEXT_ALIGN,
|
||||
TYPOGRAPHY,
|
||||
@ -91,6 +91,7 @@ export default function RecoveryPhrase({ secretRecoveryPhrase }) {
|
||||
}}
|
||||
icon={copied ? null : <Copy size={20} color="#3098DC" />}
|
||||
className="recovery-phrase__footer--copy--button"
|
||||
type="link"
|
||||
>
|
||||
{copied ? t('copiedExclamation') : t('copyToClipboard')}
|
||||
</Button>
|
||||
@ -98,7 +99,7 @@ export default function RecoveryPhrase({ secretRecoveryPhrase }) {
|
||||
type="primary"
|
||||
className="recovery-phrase__footer--button"
|
||||
onClick={() => {
|
||||
history.push(INITIALIZE_CONFIRM_SEED_PHRASE_ROUTE);
|
||||
history.push(ONBOARDING_CONFIRM_SRP_ROUTE);
|
||||
}}
|
||||
>
|
||||
{t('next')}
|
||||
|
Loading…
Reference in New Issue
Block a user