aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/account-menu/index.js
blob: 7dc3d10a537c2315c20c5ff1c4ab7bb057b6ce39 (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
const inherits = require('util').inherits
const Component = require('react').Component
const connect = require('react-redux').connect
const h = require('react-hyperscript')
const actions = require('../../actions')
const { Menu, Item, Divider } = require('../dropdowns/components/menu')

module.exports = connect(mapStateToProps, mapDispatchToProps)(AccountMenu)

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

function mapStateToProps (state) {
  return {
    selectedAddress: state.metamask.selectedAddress,
  }
}

function mapDispatchToProps () {
  return {}
}

AccountMenu.prototype.render = function () {
  return h(Menu, { className: 'account-menu' }, [
    h(Item, { className: 'account-menu__header' }, [
      'My Accounts',
      h('button.account-menu__logout-button', 'Log out'),
    ]),
    h(Divider),
    h(Item, { text: 'hi' }),
    h(Divider),
    h(Item, {
      onClick: true,
      icon: h('img', { src: 'images/plus-btn-white.svg' }),
      text: 'Create Account',
    }),
    h(Item, {
      onClick: true,
      icon: h('img', { src: 'images/import-account.svg' }),
      text: 'Import Account',
    }),
    h(Divider),
    h(Item, {
      onClick: true,
      icon: h('img', { src: 'images/mm-info-icon.svg' }),
      text: 'Info & Help',
    }),
    h(Item, {
      onClick: true,
      icon: h('img', { src: 'images/settings.svg' }),
      text: 'Settings',
    }),
  ])
}