AppNavigation.js
1.37 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
43
44
45
46
47
48
49
50
51
52
53
54
55
import React, { Component } from 'react';
import { Navbar } from 'react-bootstrap';
import { Link } from 'react-router';
import {PublicNavigation} from './PublicNavigation.js';
import {AuthenticatedNavigation} from './AuthenticatedNavigation.js';
// import '/imports/client/assets/css/icons/icomoon/styles.css';
// import '/imports/client/assets/css/bootstrap.css';
// import '/imports/client/assets/css/core.css';
// import '/imports/client/assets/css/components.css';
// import '/imports/client/assets/css/colors.css';
// import '/imports/client/assets/css/colors.css';
export class AppNavigation extends Component {
constructor(props) {
super(props);
this.state = {
};
};
onUpdate(key, value) {
this.setState({[key]: value});
};
render() {
const {user} = this.props.data;
console.log(user);
if(user){
return(
<AuthenticatedNavigation
data = {this.props.data}
/>
)
}else{
return(
<Navbar>
<Navbar.Header>
<Navbar.Brand>
<Link to="/">Application Name</Link>
</Navbar.Brand>
<Navbar.Toggle />
</Navbar.Header>
<Navbar.Collapse>
<PublicNavigation />
</Navbar.Collapse>
</Navbar>
)
}
return (
<div></div>
);
};
};