/* eslint-disable import/no-absolute-path */ import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { LinkContainer } from 'react-router-bootstrap'; import { Trans, withTranslation } from 'react-i18next'; import { testId } from '/imports/ui/components/Utils/TestUtils'; /* import BetaRibbon from '../../components/BetaRibbon/BetaRibbon'; */ import PublicNavigation from '../PublicNavigation/PublicNavigation'; import AuthenticatedNavigation from '../AuthenticatedNavigation/AuthenticatedNavigation'; import NavItem from '../NavItem/NavItem'; import './Navigation.scss'; // removed class: fixed-top // md instead of lg: no menu in medium // // Bootstrap 4→5 prep: the collapse used to be driven by Bootstrap's jQuery JS // (`data-toggle="collapse"`), which goes away when we drop `alexwine:bootstrap-4` // for `bootstrap@5`. Toggling the `.show` class from React state removes that // dependency and keeps working on the current BS4 CSS (`.collapse.show` is pure // CSS; jQuery only added the height animation). Clicking a nav link collapses the // mobile menu again — the old per-NavItem `data-target=".navbar-collapse.show"`. const Navigation = ({ name = '', ...props }) => { const [open, setOpen] = React.useState(false); const close = () => setOpen(false); return ( ); }; Navigation.propTypes = { t: PropTypes.func.isRequired, authenticated: PropTypes.bool.isRequired }; export default withTranslation()(Navigation);