diff --git a/website/src/components/SearchPage/SearchFullUI.spec.tsx b/website/src/components/SearchPage/SearchFullUI.spec.tsx index d0f900e11..77b9aef83 100644 --- a/website/src/components/SearchPage/SearchFullUI.spec.tsx +++ b/website/src/components/SearchPage/SearchFullUI.spec.tsx @@ -99,9 +99,9 @@ function renderSearchFullUI({ primaryKey: 'accession', } as Schema, initialData: [], - - initialCount : 0 - , initialQueryDict : {} + + initialCount: 0, + initialQueryDict: {}, }; render( diff --git a/website/src/pages/[organism]/submission/[groupId]/released.astro b/website/src/pages/[organism]/submission/[groupId]/released.astro index 428509c60..e3da3dafe 100644 --- a/website/src/pages/[organism]/submission/[groupId]/released.astro +++ b/website/src/pages/[organism]/submission/[groupId]/released.astro @@ -7,8 +7,8 @@ import { GROUP_ID_FIELD, VERSION_STATUS_FIELD } from '../../../../settings'; import { siloVersionStatuses } from '../../../../types/lapis'; import { getAccessToken } from '../../../../utils/getAccessToken'; import { getReferenceGenomesSequenceNames } from '../../../../utils/search'; -import { getGroupsAndCurrentGroup } from '../../../../utils/submissionPages'; import { performLapisSearchQueries } from '../../../../utils/serversideSearch'; +import { getGroupsAndCurrentGroup } from '../../../../utils/submissionPages'; const groupsResult = await getGroupsAndCurrentGroup(Astro.params, Astro.locals.session); if (groupsResult.isErr()) { @@ -63,4 +63,4 @@ const { data, totalCount } = await performLapisSearchQueries( initialCount={totalCount} initialQueryDict={initialQueryDict} /> - \ No newline at end of file + diff --git a/website/src/utils/search.ts b/website/src/utils/search.ts index 26d4649ca..ea0bcb4b8 100644 --- a/website/src/utils/search.ts +++ b/website/src/utils/search.ts @@ -83,7 +83,7 @@ export const getColumnVisibilitiesFromQuery = (schema: Schema, state: Record schema.tableColumns.includes(field.name); return getFieldOrColumnVisibilitiesFromQuery(schema, state, COLUMN_VISIBILITY_PREFIX, initiallyVisibleAccessor); }; -export const getMetadataSchemaWithExpandedRanges = (metadataSchema: Metadata []) => { +export const getMetadataSchemaWithExpandedRanges = (metadataSchema: Metadata[]) => { const result = []; for (const field of metadataSchema) { if (field.rangeSearch === true) { diff --git a/website/src/utils/serversideSearch.ts b/website/src/utils/serversideSearch.ts index 55abdb33e..198daf70b 100644 --- a/website/src/utils/serversideSearch.ts +++ b/website/src/utils/serversideSearch.ts @@ -5,6 +5,7 @@ import { ORDER_KEY, PAGE_KEY, getColumnVisibilitiesFromQuery, + type SearchResponse, } from './search'; import type { TableSequenceData } from '../components/SearchPage/Table'; import { LapisClient } from '../services/lapisClient'; @@ -12,12 +13,6 @@ import { pageSize } from '../settings'; import type { Schema } from '../types/config'; import type { ReferenceGenomesSequenceNames } from '../types/referencesGenomes'; -// If these types are not already defined in the new file, you'll need to import or define them: -export type SearchResponse = { - data: TableSequenceData[]; - totalCount: number; -}; - export const performLapisSearchQueries = async ( state: Record, schema: Schema, @@ -50,7 +45,7 @@ export const performLapisSearchQueries = async ( orderBy: [ { field: orderByField, - type: (orderDirection==="ascending" ? "ascending" : "descending"), + type: orderDirection === 'ascending' ? 'ascending' : 'descending', }, ], }),