diff --git a/src/components/Navbar.js b/src/components/Navbar.js index d701846d..54168aac 100644 --- a/src/components/Navbar.js +++ b/src/components/Navbar.js @@ -13,18 +13,51 @@ class Navbar extends Component { super(props); let {intl} = this.props; + this.state = { + displayHomeButton: false, + displayAddExerciseButton: true + } + } + + toggleButtons=()=>{ + this.setState({ + displayHomeButton: !this.state.displayHomeButton, + displayAddExerciseButton: !this.state.displayAddExerciseButton + }) } // redirect to new exercise template directToNew=()=>{ - this.props.history.push('/new') + this.props.history.push('/new'); + this.toggleButtons(); }; // redirect to home screen directToHome=()=>{ this.props.history.push('/') + this.toggleButtons(); }; + HomeButton=(homeTitle)=>{ + if(this.state.displayHomeButton){ + return