Skip to content

Commit

Permalink
Eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Sep 28, 2021
1 parent 48ed0d1 commit 11b12e1
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 37 deletions.
14 changes: 11 additions & 3 deletions components/ButtonLink.jsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
import React from 'react';
import PropTypes from 'prop-types';

import styles from '@/styles/components/Button.module.css';

const ButtonLink = React.forwardRef(({ onClick, children, variant }, ref) => {
return (
<button onClick={onClick} className={`fr-btn ${variant === "secondary" ? "fr-btn--secondary" : ""}`}>
{ children }
</button>
);
})
});

ButtonLink.defaultProps = {
variant: "primary",
};

ButtonLink.propTypes = {
onClick: PropTypes.func.isRequired,
children: PropTypes.node.isRequired,
variant: PropTypes.string,
};

export default ButtonLink;
2 changes: 0 additions & 2 deletions components/QuestionSection.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import Link from 'next/link';

import ButtonLink from '@/components/ButtonLink';

import styles from '@/styles/components/QuestionSection.module.css';
Expand Down
26 changes: 12 additions & 14 deletions layouts/BaseLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
import PropTypes from 'prop-types';

import Head from 'next/head';
import Image from 'next/image';
import Link from 'next/link';
import { useRouter } from 'next/router'
import { useRouter } from 'next/router';

import ButtonLink from '@/components/ButtonLink';

Expand Down Expand Up @@ -56,22 +55,21 @@ function Header() {
<div className="fr-header__menu fr-modal" id="modal-menu" aria-labelledby="button-825">
<div className="fr-container">
<button className="fr-link--close fr-link" aria-controls="modal-menu">Fermer</button>
<div className="fr-header__menu-links">
</div>
<div className="fr-header__menu-links" />

<nav className="fr-nav" role="navigation" aria-label="Menu principal" id="header-navigation">
<ul className="fr-nav__list">
<li className="fr-nav__item">
<a href="/taxis_group" className="fr-nav__link" {...(router.asPath === "/taxis_group" ? {"aria-current": "page"} : {})}>Groupement de taxis</a>
<a href="/taxis_group" className="fr-nav__link" {...(router.asPath === "/taxis_group" ? { "aria-current": "page" } : {})}>Groupement de taxis</a>
</li>
<li className="fr-nav__item">
<a href="/taxi" className="fr-nav__link" {...(router.asPath === "/taxi" ? {"aria-current": "page"} : {})}>Artisan taxi</a>
<a href="/taxi" className="fr-nav__link" {...(router.asPath === "/taxi" ? { "aria-current": "page" } : {})}>Artisan taxi</a>
</li>
<li className="fr-nav__item">
<a href="/aom" className="fr-nav__link" {...(router.asPath === "/aom" ? {"aria-current": "page"} : {})}>Mobilité publique</a>
<a href="/aom" className="fr-nav__link" {...(router.asPath === "/aom" ? { "aria-current": "page" } : {})}>Mobilité publique</a>
</li>
<li className="fr-nav__item">
<a href="/maas" className="fr-nav__link" {...(router.asPath === "/maas" ? {"aria-current": "page"} : {})}>Application de mobilité</a>
<a href="/maas" className="fr-nav__link" {...(router.asPath === "/maas" ? { "aria-current": "page" } : {})}>Application de mobilité</a>
</li>
</ul>
</nav>
Expand All @@ -97,20 +95,20 @@ function Footer() {
</div>
<div className="fr-footer__content">
<p className="fr-footer__content-desc">
Le code source est ouvert et les contributions sont bienvenues. <a href="https://www.github.com/openmaraude/www" target="_blank">Voir le code source.</a>
Le code source est ouvert et les contributions sont bienvenues. <a href="https://www.github.com/openmaraude/www" rel="noreferrer" target="_blank">Voir le code source.</a>
</p>
<ul className="fr-footer__content-list">
<li className="fr-footer__content-item">
<a className="fr-footer__content-link" href="https://legifrance.gouv.fr" target="_blank">legifrance.gouv.fr</a>
<a className="fr-footer__content-link" href="https://legifrance.gouv.fr" rel="noreferrer" target="_blank">legifrance.gouv.fr</a>
</li>
<li className="fr-footer__content-item">
<a className="fr-footer__content-link" href="https://gouvernement.fr" target="_blank">gouvernement.fr</a>
<a className="fr-footer__content-link" href="https://gouvernement.fr" rel="noreferrer" target="_blank">gouvernement.fr</a>
</li>
<li className="fr-footer__content-item">
<a className="fr-footer__content-link" href="https://service-public.fr" target="_blank">service-public.fr</a>
<a className="fr-footer__content-link" href="https://service-public.fr" rel="noreferrer" target="_blank">service-public.fr</a>
</li>
<li className="fr-footer__content-item">
<a className="fr-footer__content-link" href="https://data.gouv.fr" target="_blank">data.gouv.fr</a>
<a className="fr-footer__content-link" href="https://data.gouv.fr" rel="noreferrer" target="_blank">data.gouv.fr</a>
</li>
</ul>
</div>
Expand All @@ -131,7 +129,7 @@ function Footer() {
</li>
</ul>
<div className="fr-footer__bottom-copy">
<p>Sauf mention contraire, tous les textes de ce site sont sous <a href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" target="_blank">licence etalab-2.0</a>
<p>Sauf mention contraire, tous les textes de ce site sont sous <a href="https://github.com/etalab/licence-ouverte/blob/master/LO.md" rel="noreferrer" target="_blank">licence etalab-2.0</a>
</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion layouts/PresentationLayout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ export function CardsSection({
</div>
</div>
))}
</div>
</div>
</div>
</section>
);
}
Expand Down
6 changes: 1 addition & 5 deletions pages/_app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import React from 'react';
import '@/styles/globals.css';
import '@gouvfr/dsfr/dist/css/dsfr.min.css';


function MyApp({ Component, pageProps }) {
React.useEffect(async () => {
//const resp = await import('@gouvfr/dsfr/dist/js/dsfr.module');
const resp = await import('@gouvfr/dsfr/src/main');
});
React.useEffect(() => import('@gouvfr/dsfr/src/main'));
return (
<>
<Component {...pageProps} />
Expand Down
24 changes: 12 additions & 12 deletions pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function ChallengesSection() {
<p className="fr-card__desc">Recevez de nouvelles courses lorsque vous êtes en maraude</p>
</div>
<div className="fr-card__img">
<img src="/images/homepage/taxi.svg" className="fr-responsive-img" />
<img src="/images/homepage/taxi.svg" className="fr-responsive-img" alt="" />
</div>
</div>
</div>
Expand All @@ -79,7 +79,7 @@ function ChallengesSection() {
<p className="fr-card__desc">Connectez vos taxis à tous les usagers</p>
</div>
<div className="fr-card__img">
<img src="/images/homepage/taxis_group.svg" className="fr-responsive-img" />
<img src="/images/homepage/taxis_group.svg" className="fr-responsive-img" alt="" />
</div>
</div>
</div>
Expand All @@ -93,7 +93,7 @@ function ChallengesSection() {
<p className="fr-card__desc">Proposez aussi les taxis dans votre application grand public</p>
</div>
<div className="fr-card__img">
<img src="/images/homepage/trip_planning_application.svg" className="fr-responsive-img" />
<img src="/images/homepage/trip_planning_application.svg" className="fr-responsive-img" alt="" />
</div>
</div>
</div>
Expand All @@ -107,7 +107,7 @@ function ChallengesSection() {
<p className="fr-card__desc">Intégrez le service public des taxis à votre offre locale</p>
</div>
<div className="fr-card__img">
<img src="/images/homepage/maas.svg" className="fr-responsive-img" />
<img src="/images/homepage/maas.svg" className="fr-responsive-img" alt="" />
</div>
</div>
</div>
Expand Down Expand Up @@ -138,14 +138,14 @@ function PartnersSection() {
<h2>Nos partenaires</h2>

<div className="fr-grid-row fr-grid-row--middle">
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoAlphaTaxi} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoG7} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoGrenobleMobilite} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoMoovit} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoOnlyMoov} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoParisTaxis} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoTako} /></div>
<div style={{textAlign: 'center'}} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoTaxisMarseille} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoAlphaTaxi} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoG7} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoGrenobleMobilite} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoMoovit} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoOnlyMoov} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoParisTaxis} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoTako} /></div>
<div style={{ textAlign: 'center' }} className="fr-pb-5w fr-col-12 fr-col-md-6 fr-col-xl-3"><Image src={LogoTaxisMarseille} /></div>
</div>
</div>
</section>
Expand Down

0 comments on commit 11b12e1

Please sign in to comment.