diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-07-05 21:40:24 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-05 21:40:24 +0200 |
| commit | dfd2ded56780995cec6d91af37443b710d4ddb3b (patch) | |
| tree | 3e6ae47dba2dac42a3bf722709dbe75437966e4f /opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js | |
| parent | 49fc69c9cf154f9ad727e58f451e4be24dbaaff0 (diff) | |
| parent | 0e52785dfc5e99f48718530976083cfbd1507651 (diff) | |
ui: Upgrade to Next.js 11
This pull request updates the OpenDC frontend to use Next.js 11.
* Upgrade to Next.js 11
* Enable React Strict mode
* Enable ESLint
* Fix ESLint issues
Diffstat (limited to 'opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js')
| -rw-r--r-- | opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js b/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js index 28207968..8aaaf847 100644 --- a/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js +++ b/opendc-web/opendc-web-ui/src/components/navigation/AppNavbarComponent.js @@ -1,15 +1,16 @@ +import PropTypes from 'prop-types' import React from 'react' import Link from 'next/link' -import { NavLink } from 'reactstrap' +import { NavLink, NavItem as RNavItem } from 'reactstrap' import Navbar, { NavItem } from './Navbar' -import {} from './Navbar.module.scss' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { faList } from '@fortawesome/free-solid-svg-icons' +import { Project } from '../../shapes' const AppNavbarComponent = ({ project, fullWidth }) => ( <Navbar fullWidth={fullWidth}> <NavItem route="/projects"> - <Link href="/projects"> + <Link href="/projects" passHref> <NavLink title="My Projects"> <FontAwesomeIcon icon={faList} className="mr-2" /> My Projects @@ -17,15 +18,20 @@ const AppNavbarComponent = ({ project, fullWidth }) => ( </Link> </NavItem> {project ? ( - <NavItem> - <Link href={`/projects/${project._id}`}> + <RNavItem> + <Link href={`/projects/${project._id}`} passHref> <NavLink title="Current Project"> <span>{project.name}</span> </NavLink> </Link> - </NavItem> + </RNavItem> ) : undefined} </Navbar> ) +AppNavbarComponent.propTypes = { + project: Project, + fullWidth: PropTypes.bool, +} + export default AppNavbarComponent |
