Skip to content

Commit

Permalink
fix(search): Duplicate searches
Browse files Browse the repository at this point in the history
  • Loading branch information
annelhote committed Nov 7, 2024
1 parent cec029d commit 6d29995
Show file tree
Hide file tree
Showing 12 changed files with 859 additions and 25 deletions.
4 changes: 2 additions & 2 deletions client/src/pages/affiliations.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ import PublicationsTile from '../components/tiles/publications';
import { status } from '../config';
import useToast from '../hooks/useToast';
import { getAffiliationsCorrections } from '../utils/curations';
import { normalize } from '../utils/strings';
import { isRor } from '../utils/ror';
import { normalize } from '../utils/strings';
import { getWorks } from '../utils/works';
import Openalex from './openalex-ror/openalex';
import Datasets from './views/datasets';
import Openalex from './ror-openalex/openalex';
import Publications from './views/publications';

import 'primereact/resources/primereact.min.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import { Button, Col, Row } from '@dataesr/dsfr-plus';
import PropTypes from 'prop-types';
import { useEffect, useState } from 'react';

import Gauge from '../components/gauge';
import { datasources, status } from '../config';
import Gauge from '../../components/gauge';
import { datasources, status } from '../../config';
import {
normalizeName,
renderButtonDataset,
renderButtons,
} from '../utils/works';
} from '../../utils/works';
import DatasetsView from './datasetsView';

export default function DatasetsTab({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
linkedORCIDTemplate,
statusRowFilterTemplate,
statusTemplate,
} from '../utils/templates';
} from '../../utils/templates';

export default function DatasetsView({
filteredAffiliationName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import HighchartsReact from 'highcharts-react-official';
import PropTypes from 'prop-types';
import { useSearchParams } from 'react-router-dom';

import { range } from '../utils/works';
import { range } from '../../utils/works';

export default function DatasetsYearlyDistribution({ allDatasets, field, subfield = undefined }) {
const [searchParams] = useSearchParams();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {
import { useEffect, useState } from 'react';
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';

import TagInput from '../components/tag-input';
import { getRorData, isRor } from '../utils/ror';
import TagInput from '../../components/tag-input';
import { getRorData, isRor } from '../../utils/ror';

const { VITE_APP_TAG_LIMIT } = import.meta.env;

Expand All @@ -24,7 +24,7 @@ const years = [...Array(new Date().getFullYear() - START_YEAR + 1).keys()]
.map((year) => (year + START_YEAR).toString())
.map((year) => ({ label: year, value: year }));

export default function Filters() {
export default function Search() {
const { pathname, search } = useLocation();
const navigate = useNavigate();
const [searchParams, setSearchParams] = useSearchParams();
Expand Down
Loading

0 comments on commit 6d29995

Please sign in to comment.