-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTasksMenu.jsx
More file actions
38 lines (31 loc) · 1.05 KB
/
TasksMenu.jsx
File metadata and controls
38 lines (31 loc) · 1.05 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
import React from 'react';
import { Link, withRouter } from 'react-router';
import { Navbar, NavBrand, Nav, NavItem } from 'react-bootstrap';
import { LinkContainer } from 'react-router-bootstrap';
import { observer } from 'mobx-react';
const TasksMenu = observer(['auth'], ({
projectId,
auth: { logout },
}) => {
return (
<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>
)
});
export default TasksMenu;//withRouter(TasksMenu);