diff --git a/client/src/components/mention-list/item.jsx b/client/src/components/mention-list/item.jsx index 0073ffd..fab48b8 100644 --- a/client/src/components/mention-list/item.jsx +++ b/client/src/components/mention-list/item.jsx @@ -1,8 +1,10 @@ +import { Badge, Button, Col, Row, Text } from '@dataesr/dsfr-plus'; +import PropTypes from 'prop-types'; import { useState } from 'react'; -import { Badge, Button, Col, Link, Row, Text } from '@dataesr/dsfr-plus'; + import { getIdLink } from '../../utils/works'; -export default function MentionListItem({ mention, index, selected, toggleToSelected }) { +export default function MentionListItem({ mention }) { const [expanded, setExpanded] = useState(false); const getIdLinkDisplay = (idType, idValue) => { @@ -15,10 +17,9 @@ export default function MentionListItem({ mention, index, selected, toggleToSele return (
  • - - + @@ -108,3 +109,7 @@ export default function MentionListItem({ mention, index, selected, toggleToSele
  • ); } + +MentionListItem.propTypes = { + mention: PropTypes.object.isRequired, +}; diff --git a/client/src/pages/datasets/search.jsx b/client/src/pages/datasets/search.jsx index 80f5917..23b88ef 100644 --- a/client/src/pages/datasets/search.jsx +++ b/client/src/pages/datasets/search.jsx @@ -240,14 +240,12 @@ export default function DatasetsSearch() { buttonLabel={currentSearchParams.startYear} label="Start year" onSelectionChange={(startYear) => setSearchParams({ ...currentSearchParams, startYear })} + selectedKey={currentSearchParams.startYear} > {years.map((year) => ( {year.label} @@ -260,14 +258,12 @@ export default function DatasetsSearch() { buttonLabel={currentSearchParams.endYear} label="End year" onSelectionChange={(endYear) => setSearchParams({ ...currentSearchParams, endYear })} + selectedKey={currentSearchParams.endYear} > {years.map((year) => ( {year.label} @@ -365,12 +361,12 @@ export default function DatasetsSearch() { buttonLabel={currentSearchParams.startYear} label="Start year" onSelectionChange={(startYear) => setSearchParams({ ...currentSearchParams, startYear })} + selectedKey={currentSearchParams.startYear} > {years.map((year) => ( {year.label} @@ -383,12 +379,12 @@ export default function DatasetsSearch() { buttonLabel={currentSearchParams.endYear} label="End year" onSelectionChange={(endYear) => setSearchParams({ ...currentSearchParams, endYear })} + selectedKey={currentSearchParams.endYear} > {years.map((year) => ( {year.label} diff --git a/client/src/pages/mentions/index.jsx b/client/src/pages/mentions/index.jsx index 063e4d5..a150077 100644 --- a/client/src/pages/mentions/index.jsx +++ b/client/src/pages/mentions/index.jsx @@ -852,9 +852,8 @@ export default function Mentions() {