|
@ -1,23 +1,17 @@ |
|
|
import React, { Component } from 'react'; |
|
|
import React, { Component } from 'react'; |
|
|
|
|
|
import {bindActionCreators} from 'redux'; |
|
|
|
|
|
import {connect} from 'react-redux'; |
|
|
import { push } from 'connected-react-router' |
|
|
import { push } from 'connected-react-router' |
|
|
import PropTypes from 'prop-types'; |
|
|
import PropTypes from 'prop-types'; |
|
|
|
|
|
|
|
|
import { Image, Menu } from 'semantic-ui-react' |
|
|
import { Image, Menu } from 'semantic-ui-react' |
|
|
|
|
|
|
|
|
import logo from '../resources/logo.png'; |
|
|
import logo from '../assets/images/logo.png'; |
|
|
import {bindActionCreators} from "redux"; |
|
|
|
|
|
import {connect} from "react-redux"; |
|
|
|
|
|
|
|
|
|
|
|
class NavBar extends Component { |
|
|
class NavBarContainer extends Component { |
|
|
constructor(props){ |
|
|
constructor(props){ |
|
|
super(props); |
|
|
super(props); |
|
|
|
|
|
|
|
|
// this.handleItemClick = this.handleItemClick.bind(this);
|
|
|
|
|
|
|
|
|
|
|
|
this.navRef = React.createRef(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
render() { |
|
|
return ( |
|
|
return ( |
|
|
<Menu fixed='top' inverted> |
|
|
<Menu fixed='top' inverted> |
|
@ -37,7 +31,7 @@ class NavBar extends Component { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
NavBar.contextTypes = { |
|
|
NavBarContainer.contextTypes = { |
|
|
router: PropTypes.object |
|
|
router: PropTypes.object |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
@ -45,13 +39,10 @@ const mapDispatchToProps = dispatch => bindActionCreators({ |
|
|
navigateTo: (location) => push(location) |
|
|
navigateTo: (location) => push(location) |
|
|
}, dispatch); |
|
|
}, dispatch); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const mapStateToProps = state => { |
|
|
const mapStateToProps = state => { |
|
|
return { |
|
|
return { |
|
|
hasSignedUp: state.user.hasSignedUp, |
|
|
hasSignedUp: state.user.hasSignedUp, |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
//export default drizzleConnect(NavBar, mapStateToProps, mapDispatchToProps);
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(NavBarContainer); |
|
|
|
|
|
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(NavBar); |
|
|
|