-
- Intitulé
-
- officiel
-
+
diff --git a/client/src/pages/actions/actionsOpenalexFeedback.jsx b/client/src/pages/actions/actionsOpenalexFeedback.jsx
index d99136a2..468bba75 100644
--- a/client/src/pages/actions/actionsOpenalexFeedback.jsx
+++ b/client/src/pages/actions/actionsOpenalexFeedback.jsx
@@ -31,13 +31,7 @@ export default function ActionsOpenalexFeedback({ allOpenalexCorrections }) {
useEffect(() => {
const emailRegex = new RegExp(/^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i);
- const testEmail = (email) => {
- if (emailRegex.test(email)) {
- setValidEmail(email);
- } else {
- setValidEmail(null);
- }
- };
+ const testEmail = (email) => setValidEmail(emailRegex.test(email) ? email : null);
const timeOutId = setTimeout(() => testEmail(userEmail), 500);
return () => clearTimeout(timeOutId);
}, [userEmail]);
diff --git a/client/src/pages/filters.jsx b/client/src/pages/filters.jsx
index 144be0e5..63c1e16d 100644
--- a/client/src/pages/filters.jsx
+++ b/client/src/pages/filters.jsx
@@ -27,6 +27,7 @@ const START_YEAR = 2010;
const years = [...Array(new Date().getFullYear() - START_YEAR + 1).keys()].map((year) => (year + START_YEAR).toString()).map((year) => ({ label: year, value: year }));
const normalizeStr = (x) => x.replaceAll(',', ' ').replaceAll(' ', ' ');
+
export default function Filters({ sendQuery }) {
const [searchParams, setSearchParams] = useSearchParams();
const [currentSearchParams, setCurrentSearchParams] = useState({});
diff --git a/client/src/pages/index.jsx b/client/src/pages/index.jsx
index 0f325b7b..4795f431 100644
--- a/client/src/pages/index.jsx
+++ b/client/src/pages/index.jsx
@@ -1,9 +1,7 @@
-/* eslint-disable max-len */
import { useEffect, useState } from 'react';
import { useSearchParams } from 'react-router-dom';
-import { Container } from '@dataesr/dsfr-plus';
+import { Container, Spinner } from '@dataesr/dsfr-plus';
import { useQuery } from '@tanstack/react-query';
-import { PageSpinner } from '../components/spinner';
import { status } from '../config';
import Filters from './filters';
import { getData } from '../utils/works';
@@ -95,7 +93,7 @@ export default function Home() {
{(isFetching || (isFetched && (allAffiliations?.length ?? 0) === 0)) && (
-
+
)}
{!isFetching
&& (allAffiliations?.length > 0 || allDatasets?.length > 0 || allPublications?.length > 0)