Skip to content

Commit

Permalink
Merge pull request #106 from anct-cnum/recette
Browse files Browse the repository at this point in the history
MEP
  • Loading branch information
QuentinFontenay authored Oct 11, 2023
2 parents 2f5a817 + e34a4bc commit ebab9d3
Showing 1 changed file with 35 additions and 14 deletions.
49 changes: 35 additions & 14 deletions src/components/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function Menu() {
const urlDashboard = process.env.REACT_APP_DASHBOARD_URL;
const urlCoop = process.env.REACT_APP_COOP_URL;
const urlCandidat = process.env.REACT_APP_CANDIDAT_URL;
const urlFormCandidature = process.env.REACT_APP_FORMS_URL;

const toggleBurgerMenu = () => {
dispatch(menuActions.toggleBurgerMenu());
Expand Down Expand Up @@ -55,11 +56,11 @@ function Menu() {
<button
id="home"
className="fr-nav__btn"
aria-expanded={ activeMenu === 'home' }
aria-expanded={activeMenu === 'home'}
aria-controls="menu-home"
onClick={onClickMenu}
{...(location.pathname.startsWith('/accueil') || location.pathname === '/' ? { 'aria-current': true } : {})}>
Accueil
Accueil
</button>
<div className={`fr-collapse fr-menu ${activeMenu === 'home' ? 'fr-collapse--expanded' : ''}`} id="menu-home">
<ul className="fr-menu__list">
Expand All @@ -80,25 +81,25 @@ function Menu() {
to="/carte"
className="fr-nav__link"
{...(location.pathname.startsWith('/carte') ? { 'aria-current': 'page' } : {})}>
Carte
Carte
</Link>
</li>
<li className="fr-nav__item">
<a className="fr-nav__link"
href="https://metabase.conseiller-numerique.gouv.fr/public/dashboard/446208c4-cae2-4c0c-be19-44cb14ce7d06"
target="_blank" rel="noopener noreferrer">
Statistiques
Statistiques
</a>
</li>
<li className="fr-nav__item">
<button
id="cnfs"
className="fr-nav__btn"
aria-expanded={ activeMenu === 'cnfs' }
aria-expanded={activeMenu === 'cnfs'}
aria-controls="menu-cnfs"
onClick={onClickMenu}
{...(location.pathname.startsWith('/aide-candidat') || location.pathname.startsWith('/aide-structure') ? { 'aria-current': true } : {})}>
Recrutement
Recrutement
</button>
<div className={`fr-collapse fr-menu ${activeMenu === 'cnfs' ? 'fr-collapse--expanded' : ''}`} id="menu-cnfs">
<ul className="fr-menu__list">
Expand All @@ -125,9 +126,9 @@ function Menu() {
<button
id="pfs"
className="fr-nav__btn"
aria-expanded={ activeMenu === 'pfs' }
aria-expanded={activeMenu === 'pfs'}
aria-controls="menu-pfs" onClick={onClickMenu}>
Mon compte
Mon compte
</button>
<div className={`fr-collapse fr-menu ${activeMenu === 'pfs' ? 'fr-collapse--expanded' : ''}`} id="menu-pfs">
<ul className="fr-menu__list">
Expand All @@ -149,12 +150,32 @@ function Menu() {
</div>
</li>
<li className="fr-nav__item">
<Link
to="/coordination-territoriale"
className="fr-nav__link"
{...(location.pathname.startsWith('/coordination-territoriale') ? { 'aria-current': 'page' } : {})}>
Coordination territoriale
</Link>
<button
id="coordinateur"
className="fr-nav__btn"
aria-expanded={activeMenu === 'coordinateur'}
aria-controls="menu-coordinateur"
onClick={onClickMenu}
{...(location.pathname.startsWith('/coordination-territoriale') ? { 'aria-current': true } : {})}>
Coordination territoriale
</button>
<div className={`fr-collapse fr-menu ${activeMenu === 'coordinateur' ? 'fr-collapse--expanded' : ''}`} id="menu-coordinateur">
<ul className="fr-menu__list" style={{ width: '23rem' }}>
<li>
<a href={`${urlFormCandidature}/structure/new`} className="fr-nav__link">
Recrutement d&rsquo;un coordinateur
</a>
</li>
<li>
<Link
to="/coordination-territoriale"
className="fr-nav__link"
{...(location.pathname.startsWith('/coordination-territoriale') ? { 'aria-current': 'page' } : {})}>
Les missions et la cartographie des coordinateurs
</Link>
</li>
</ul>
</div>
</li>
</ul>
</nav>
Expand Down

0 comments on commit ebab9d3

Please sign in to comment.