-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTasksMenu.jsx
More file actions
42 lines (36 loc) · 1.08 KB
/
Copy pathTasksMenu.jsx
File metadata and controls
42 lines (36 loc) · 1.08 KB
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
import React from 'react';
import { Link } from 'react-router';
import { Navbar, NavBrand, Nav, NavItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
const TasksMenu = ({
projectId,
logout,
}) => (
<Navbar>
<NavBrand>
<Link to='/'>Task-tracker</Link>
</NavBrand>
<Nav>
<LinkContainer to={`/projects/${projectId}/tasks`}>
<NavItem eventKey={1} >
tasks
</NavItem>
</LinkContainer>
<LinkContainer to={`/projects/${projectId}/tasks/add`}>
<NavItem eventKey={2} href='#'>add task</NavItem>
</LinkContainer>
</Nav>
<Nav pullRight>
<NavItem eventKey={3} onSelect={() => logout()}>logout</NavItem>
</Nav>
</Navbar>
);
import { connect } from 'react-redux';
import { logout } from 'reduxApp/modules/auth';
export default connect(
state => ({
projectId: state.router.params.projectId,
router: state.router,
}),
{ logout }
)(TasksMenu);;