1
0
Fork 0

Basic react state

This commit is contained in:
Amarpreet Minhas 2019-08-19 23:28:13 -04:00
parent 7ace77d7df
commit 91c1e88a4c

View file

@ -1,7 +1,17 @@
import React, { Component } from 'react';
import { NavLink } from 'react-router-dom';
import { connect } from 'react-redux';
class NavBar extends Component {
constructor (props) {
super(props)
this.state = {
logged_in: false,
auth_menu_visible: false
}
}
componentDidMount() {
}
render() {
return (
<div className="ui four item secondary menu">
@ -20,4 +30,13 @@ class NavBar extends Component {
}
}
export default NavBar;
const mapStateToProps = (state) => {
return {
logged_in: state.logged_in,
auth_menu_collapsed: state.auth_menu_collapsed
};
}
export default connect(
mapStateToProps,
)(NavBar);