-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDashboardMenu.jsx
More file actions
36 lines (30 loc) · 949 Bytes
/
Copy pathDashboardMenu.jsx
File metadata and controls
36 lines (30 loc) · 949 Bytes
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
import React from 'react';
import { Link } from 'react-router';
import { Navbar, NavBrand, Nav, NavItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
const DashboardMenu = ({
logout,
addProject,
}) => (
<Navbar>
<NavBrand>
<Link to='/'>Task-tracker</Link>
</NavBrand>
<Nav>
<NavItem eventKey={2} onClick={addProject}>add project</NavItem>
<LinkContainer to='/users'>
<NavItem eventKey={1}>users</NavItem>
</LinkContainer>
</Nav>
<Nav pullRight>
<NavItem eventKey={3} onSelect={() => logout()}>logout</NavItem>
</Nav>
</Navbar>
);
import { connect } from 'react-redux';
import { showAddProject } from 'reduxApp/modules/app';
import { logout } from 'reduxApp/modules/auth';
export default connect(
null,
{ addProject: showAddProject, logout }
)(DashboardMenu);