diff --git a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js b/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js index 4b9d53e..a922d09 100644 --- a/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js +++ b/imports/client/views/org/app/module/navigation/AuthenticatedNavigation.js @@ -3,21 +3,24 @@ import { browserHistory } from 'react-router'; import { LinkContainer } from 'react-router-bootstrap'; import { logout } from '/imports/client/app/utils/loginMethods'; import { Navbar,Modal, Nav, NavItem, - Glyphicon, Collapse, + Glyphicon, Collapse, NavbarToggler, NavbarBrand, NavLink, DropdownItem, DropdownToggle, DropdownMenu, NavDropdown, MenuItem } from 'react-bootstrap'; import { Meteor } from 'meteor/meteor'; +import $ from 'jquery'; + const handleLogout = () => Meteor.logout(() => browserHistory.push('/login')); export class AuthenticatedNavigation extends Component { constructor(props) { super(props); - this.toggle = this.toggle.bind(this); + this.changeBodyClass = this.changeBodyClass.bind(this); this.state = { - dropdownOpen: false + dropdownOpen: false, + burgerMenu: false }; } toggle() { @@ -25,13 +28,22 @@ export class AuthenticatedNavigation extends Component { dropdownOpen: !this.state.dropdownOpen }); } + changeBodyClass(){ + if(this.state.burgerMenu){ + $('body').addClass('sidebar-xs'); + this.setState({burgerMenu: false}); + }else{ + $('body').removeClass('sidebar-xs'); + this.setState({burgerMenu: true}); + } + } render(){ const {user, org} = this.props.data; return( - + {org.name}