This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 216
/
Menu.js
53 lines (45 loc) · 1.56 KB
/
Menu.js
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
import React from 'react'
import PropTypes from 'prop-types'
import { withRouter } from 'react-router'
import { FormattedMessage } from 'react-intl'
import { MenuContainer, Menu, MenuItem } from 'components/UI/Dropdown'
import messages from './messages'
const SettingsMenu = ({ history, setActiveSubMenu, openModal }) => (
<MenuContainer>
<Menu justify="right">
<MenuItem
hasChildren
item={{ key: 'fiat', name: <FormattedMessage {...messages.fiat} /> }}
onClick={() => setActiveSubMenu('fiat')}
/>
<MenuItem
hasChildren
item={{ key: 'locale', name: <FormattedMessage {...messages.locale} /> }}
onClick={() => setActiveSubMenu('locale')}
/>
<MenuItem
hasChildren
item={{ key: 'theme', name: <FormattedMessage {...messages.theme} /> }}
onClick={() => setActiveSubMenu('theme')}
/>
<MenuItem
item={{ key: 'channels', name: <FormattedMessage {...messages.channels} /> }}
onClick={() => openModal('CHANNELS')}
/>
<MenuItem
item={{ key: 'Autopay', name: <FormattedMessage {...messages.autopay} /> }}
onClick={() => openModal('AUTOPAY')}
/>
<MenuItem
item={{ key: 'logout', name: <FormattedMessage {...messages.logout} /> }}
onClick={() => history.push('/logout')}
/>
</Menu>
</MenuContainer>
)
SettingsMenu.propTypes = {
history: PropTypes.object.isRequired,
openModal: PropTypes.func.isRequired,
setActiveSubMenu: PropTypes.func.isRequired,
}
export default withRouter(SettingsMenu)