From f89729c8d0e6b9abebfda82dbf55cdbf9fee6319 Mon Sep 17 00:00:00 2001 From: Louise Davies Date: Wed, 19 Jul 2023 13:36:06 +0100 Subject: [PATCH] #1532 - Fix circular dependency --- .../src/api/dataPublications.tsx | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/packages/datagateway-common/src/api/dataPublications.tsx b/packages/datagateway-common/src/api/dataPublications.tsx index c271f7d79..61ede4db6 100644 --- a/packages/datagateway-common/src/api/dataPublications.tsx +++ b/packages/datagateway-common/src/api/dataPublications.tsx @@ -2,12 +2,13 @@ import { AdditionalFilters, Datafile, Dataset, + DataPublication, FiltersType, Investigation, SortType, } from '../app.types'; import axios, { AxiosError } from 'axios'; -import { DataPublication } from '../app.types'; +import { StateType } from '../state/app.types'; import { IndexRange } from 'react-virtualized'; import { readSciGatewayToken } from '../parseTokens'; import handleICATError from '../handleICATError'; @@ -20,15 +21,9 @@ import { import { useSelector } from 'react-redux'; import { useLocation } from 'react-router-dom'; import { getApiParams, parseSearchToQuery } from '.'; -import { - fetchDatafileCountQuery, - fetchDatafiles, - fetchDatasetCountQuery, - fetchDatasets, - fetchInvestigationCount, - fetchInvestigations, - StateType, -} from '..'; +import { fetchDatafileCountQuery, fetchDatafiles } from './datafiles'; +import { fetchDatasetCountQuery, fetchDatasets } from './datasets'; +import { fetchInvestigationCount, fetchInvestigations } from './investigations'; import retryICATErrors from './retryICATErrors'; const fetchDataPublications = (