AccountCopyPhrase.js 1.01 KiB
Newer Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
Amaury Martiny's avatar
Amaury Martiny committed
// SPDX-License-Identifier: BSD-3-Clause
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { Link } from 'react-router-dom';
Amaury Martiny's avatar
Amaury Martiny committed
import CreateAccountContainer from '../CreateAccountContainer';
@inject('createAccountStore')
@observer
class AccountCopyPhrase extends Component {
Amaury Martiny's avatar
Amaury Martiny committed
  render () {
    const {
      createAccountStore: { phrase },
      location: { pathname }
    } = this.props;
    const currentStep = pathname.slice(-1);

    return (
Amaury Martiny's avatar
Amaury Martiny committed
      <CreateAccountContainer>
        <div className='text'>
          <p>Please write your secret phrase on a piece of paper:</p>
        </div>
Amaury Martiny's avatar
Amaury Martiny committed
        <div className='text -code'>{phrase}</div>
        <nav className='form-nav'>
          <Link to={`/accounts/new/${+currentStep + 1}`}>
            <button className='button'>Next</button>
          </Link>
        </nav>
      </CreateAccountContainer>
export default AccountCopyPhrase;