Send.js 1.3 KiB
Newer Older
Amaury Martiny's avatar
Amaury Martiny committed
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
Amaury Martiny's avatar
Amaury Martiny committed
//
Amaury Martiny's avatar
Amaury Martiny committed
// SPDX-License-Identifier: MIT
import React, { Component } from 'react';
import { inject, observer } from 'mobx-react';
import { Link, Route, Redirect, Switch } from 'react-router-dom';
import Sent from './Sent';
import Signer from './Signer';
import TxForm from './TxForm';
@inject('sendStore')
@observer
class Send extends Component {
Amaury Martiny's avatar
Amaury Martiny committed
  render () {
    const {
      sendStore: { token }
    } = this.props;

    if (!token) {
      return <Redirect to='/' />;
    }
        <nav className='header-nav'>
          <div className='header-nav_left'>
            <Link to='/tokens' className='icon -close'>
            </Link>
          </div>
          <div className='header-nav_title'>
            <h1>Send {token.name}</h1>
          </div>
          <div className='header-nav_right' />
        <div className='window_content'>
          <div className='box -padded'>
            <Switch>
              <Route exact path='/send' component={TxForm} />
              <Route path='/send/signer' component={Signer} />
              <Route path='/send/sent' component={Sent} />
            </Switch>
        </div>
      </div>
  }
}

export default Send;