Fix navbar not sticky

This commit is contained in:
Daniel Schädler 2025-03-16 16:31:26 +01:00
parent 7cff7bdb0b
commit d5a754ba73
1 changed files with 3 additions and 9 deletions

View File

@ -10,22 +10,16 @@ import {notify} from 'react-notify-toast';
export class TurniereNavigation extends React.Component {
constructor(props) {
super(props);
this.toggle = this.toggle.bind(this);
this.state = {
collapsed: true
};
this.state = {collapsed: true};
}
toggle() {
this.setState({
collapsed: !this.state.collapsed
});
this.setState({collapsed: !this.state.collapsed});
}
render() {
return (<Navbar color="light" light expand="lg">
return (<Navbar color="light" light expand="lg" sticky="top">
<NavbarBrand href="/">turnie.re</NavbarBrand>
<NavbarToggler onClick={this.toggle}/>
<Collapse isOpen={!this.state.collapsed} navbar>