aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts/new.js
blob: 0356bb313bc3a0252a855b679caf9b1fedea52fe (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
const inherits = require('util').inherits
const Component = require('react').Component
const h = require('react-hyperscript')
const connect = require('react-redux').connect
const TabBar = require('../components/tab-bar')

module.exports = connect(mapStateToProps)(NewAccountScreen)

function mapStateToProps (state) {
  return {}
}

inherits(NewAccountScreen, Component)
function NewAccountScreen () {
  Component.call(this)
}

NewAccountScreen.prototype.render = function () {
  const props = this.props
  const state = this.state || {}
  const subview = state.subview || 'new'

  return (
    h('.flex-column', {
      style: {
      },
    }, [

      // title and nav
      h('.flex-row.space-between', {
        style: {
          alignItems: 'center',
          padding: '0px 20px',
        }
      }, [
        h('i.fa.fa-arrow-left.fa-lg.cursor-pointer', {
          onClick: this.goHome.bind(this),
        }),
        h('h2.page-subtitle', 'Add Account'),
        h('i', { style: { width: '18px' } }),
      ]),

      h(TabBar, {
        tabs: [
          { content: 'Create New', key: 'new' },
          { content: 'Import', key: 'import' },
        ],
        defaultTab: 'new',
        tabSelected: (key) => {
          console.log('selected ' + key)
        }
      }),

    ])
  )
}

NewAccountScreen.prototype.goHome = function() {
  this.props.dispatch(actions.showAccountPage())
}