Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
theosanderson committed May 21, 2024
1 parent 32c64f1 commit a311bee
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions website/src/components/SearchPage/SearchFullUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ import { RecentSequencesBanner } from './RecentSequencesBanner.tsx';
import { SearchForm } from './SearchForm';
import { SearchPagination } from './SearchPagination';
import { SeqPreviewModal } from './SeqPreviewModal';
import { Table } from './Table';
import { Table, type TableSequenceData } from './Table';
import { parseMutationString } from './fields/MutationField.tsx';
import useQueryAsState from './useQueryAsState.js';
import { getLapisUrl } from '../../config.ts';
import { lapisClientHooks } from '../../services/serviceHooks.ts';
import { pageSize } from '../../settings';
import type { Group } from '../../types/backend.ts';
import { type MetadataFilter, type Schema, type GroupedMetadataFilter, type FieldValues } from '../../types/config.ts';
import type { OrderBy } from '../../types/lapis.ts';
import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes.ts';
import type { ClientConfig } from '../../types/runtimeConfig.ts';
import type { SearchResponse } from '../../utils/search.ts';

import { type OrderByType, type OrderBy } from '../../types/lapis.ts';

Check failure on line 21 in website/src/components/SearchPage/SearchFullUI.tsx

View workflow job for this annotation

GitHub Actions / Check format and types

`../../types/lapis.ts` import should occur before type import of `../../types/referencesGenomes.ts`

Check failure on line 21 in website/src/components/SearchPage/SearchFullUI.tsx

View workflow job for this annotation

GitHub Actions / Check format and types

'OrderByType' is defined but never used
const orderKey = 'orderBy';
const orderDirectionKey = 'order';

Expand Down Expand Up @@ -194,17 +193,16 @@ export const InnerSearchFullUI = ({
...lapisSearchParameters,
fields: [],
});
const OrderByList : OrderBy[] =[ {
field: orderByField,
type: orderDirection ,
}];
detailsHook.mutate({
...lapisSearchParameters,
fields: [...schema.tableColumns, schema.primaryKey],
limit: pageSize,
offset: (page - 1) * pageSize,
orderBy: [
{
field: orderByField,
type: orderDirection,
} as OrderBy,
],
orderBy: OrderByList,
});
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [lapisSearchParameters, schema.tableColumns, schema.primaryKey, pageSize, page, orderByField, orderDirection]);
Expand Down

0 comments on commit a311bee

Please sign in to comment.