diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-21 15:33:37 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:48:16 +0200 |
| commit | 912e1b96bfa7d6c022d854fa744f719b49ca98d0 (patch) | |
| tree | 49cdaf109aa08b0149c34174ce0f00c7056221ea /frontend/src/components/navigation/Navbar.js | |
| parent | 791b5d1e443f97adc756264878c3aae41ca0f748 (diff) | |
Add first plotting attempts for portfolios
Diffstat (limited to 'frontend/src/components/navigation/Navbar.js')
| -rw-r--r-- | frontend/src/components/navigation/Navbar.js | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/frontend/src/components/navigation/Navbar.js b/frontend/src/components/navigation/Navbar.js index 0ef19ecb..b1f1f7ae 100644 --- a/frontend/src/components/navigation/Navbar.js +++ b/frontend/src/components/navigation/Navbar.js @@ -9,10 +9,8 @@ import './Navbar.css' export const NAVBAR_HEIGHT = 60 -export const NavItem = withRouter(props => <NavItemWithoutRoute {...props} />) -export const LoggedInSection = withRouter(props => ( - <LoggedInSectionWithoutRoute {...props} /> -)) +export const NavItem = withRouter((props) => <NavItemWithoutRoute {...props} />) +export const LoggedInSection = withRouter((props) => <LoggedInSectionWithoutRoute {...props} />) const GitHubLink = () => ( <a @@ -20,19 +18,12 @@ const GitHubLink = () => ( className="ml-2 mr-3 text-dark" style={{ position: 'relative', top: 7 }} > - <span className="fa fa-github fa-2x"/> + <span className="fa fa-github fa-2x" /> </a> ) const NavItemWithoutRoute = ({ route, location, children }) => ( - <li - className={classNames( - 'nav-item clickable', - location.pathname === route ? 'active' : undefined, - )} - > - {children} - </li> + <li className={classNames('nav-item clickable', location.pathname === route ? 'active' : undefined)}>{children}</li> ) const LoggedInSectionWithoutRoute = ({ location }) => ( @@ -48,28 +39,25 @@ const LoggedInSectionWithoutRoute = ({ location }) => ( ) : ( <NavItem route="/profile" key="profile"> <Link className="nav-link" title="My Profile" to="/profile"> - <ProfileName/> + <ProfileName /> </Link> </NavItem> ), <NavItem route="logout" key="logout"> - <Logout/> + <Logout /> </NavItem>, ] ) : ( <NavItem route="login"> - <GitHubLink/> - <Login visible={true}/> + <GitHubLink /> + <Login visible={true} /> </NavItem> )} </ul> ) const Navbar = ({ fullWidth, children }) => ( - <nav - className="navbar fixed-top navbar-expand-lg navbar-light bg-faded" - id="navbar" - > + <nav className="navbar fixed-top navbar-expand-lg navbar-light bg-faded" id="navbar"> <div className={fullWidth ? 'container-fluid' : 'container'}> <button className="navbar-toggler navbar-toggler-right" @@ -80,20 +68,15 @@ const Navbar = ({ fullWidth, children }) => ( aria-expanded="false" aria-label="Toggle navigation" > - <span className="navbar-toggler-icon"/> + <span className="navbar-toggler-icon" /> </button> - <Link - className="navbar-brand opendc-brand" - to="/" - title="OpenDC" - onClick={() => window.scrollTo(0, 0)} - > - <img src="/img/logo.png" alt="OpenDC"/> + <Link className="navbar-brand opendc-brand" to="/" title="OpenDC" onClick={() => window.scrollTo(0, 0)}> + <img src="/img/logo.png" alt="OpenDC" /> </Link> <div className="collapse navbar-collapse" id="navbarSupportedContent"> <ul className="navbar-nav mr-auto">{children}</ul> - <LoggedInSection/> + <LoggedInSection /> </div> </div> </nav> |
