From 11b12e13ccc6faa541b1d2ddb017a73ba3e99ddb Mon Sep 17 00:00:00 2001 From: Julien Castets Date: Tue, 28 Sep 2021 16:20:56 +0200 Subject: [PATCH] Eslint --- components/ButtonLink.jsx | 14 +++++++++++--- components/QuestionSection.jsx | 2 -- layouts/BaseLayout.jsx | 26 ++++++++++++-------------- layouts/PresentationLayout.jsx | 2 +- pages/_app.jsx | 6 +----- pages/index.jsx | 24 ++++++++++++------------ 6 files changed, 37 insertions(+), 37 deletions(-) diff --git a/components/ButtonLink.jsx b/components/ButtonLink.jsx index df28afb..3814307 100644 --- a/components/ButtonLink.jsx +++ b/components/ButtonLink.jsx @@ -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 ( ); -}) +}); + +ButtonLink.defaultProps = { + variant: "primary", +}; + +ButtonLink.propTypes = { + onClick: PropTypes.func.isRequired, + children: PropTypes.node.isRequired, + variant: PropTypes.string, +}; export default ButtonLink; diff --git a/components/QuestionSection.jsx b/components/QuestionSection.jsx index 29856a6..bcf0b73 100644 --- a/components/QuestionSection.jsx +++ b/components/QuestionSection.jsx @@ -1,5 +1,3 @@ -import Link from 'next/link'; - import ButtonLink from '@/components/ButtonLink'; import styles from '@/styles/components/QuestionSection.module.css'; diff --git a/layouts/BaseLayout.jsx b/layouts/BaseLayout.jsx index bdba4b6..a568569 100644 --- a/layouts/BaseLayout.jsx +++ b/layouts/BaseLayout.jsx @@ -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'; @@ -56,22 +55,21 @@ function Header() { ))} - + ); } diff --git a/pages/_app.jsx b/pages/_app.jsx index 4c52d1f..bae5aff 100644 --- a/pages/_app.jsx +++ b/pages/_app.jsx @@ -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 ( <> diff --git a/pages/index.jsx b/pages/index.jsx index be75789..4305c9e 100644 --- a/pages/index.jsx +++ b/pages/index.jsx @@ -65,7 +65,7 @@ function ChallengesSection() {

Recevez de nouvelles courses lorsque vous êtes en maraude

- +
@@ -79,7 +79,7 @@ function ChallengesSection() {

Connectez vos taxis à tous les usagers

- +
@@ -93,7 +93,7 @@ function ChallengesSection() {

Proposez aussi les taxis dans votre application grand public

- +
@@ -107,7 +107,7 @@ function ChallengesSection() {

Intégrez le service public des taxis à votre offre locale

- +
@@ -138,14 +138,14 @@ function PartnersSection() {

Nos partenaires

-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+