Skip to content

Commit

Permalink
fix(website): fix search reset going to the wrong page in some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
bh-ethz authored Apr 29, 2024
1 parent 7e5de02 commit 702f701
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions website/src/components/SearchPage/SearchForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { PangoLineageField } from './fields/PangoLineageField';
import { getClientLogger } from '../../clientLogger.ts';
import { getLapisUrl } from '../../config.ts';
import { useOffCanvas } from '../../hooks/useOffCanvas';
import { type ClassOfSearchPageType, navigateToSearchLikePage, routes } from '../../routes/routes.ts';
import { type ClassOfSearchPageType, navigateToSearchLikePage } from '../../routes/routes.ts';
import type { AccessionFilter, GroupedMetadataFilter, MetadataFilter, MutationFilter } from '../../types/config.ts';
import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes.ts';
import type { ClientConfig } from '../../types/runtimeConfig.ts';
Expand Down Expand Up @@ -107,7 +107,7 @@ export const SearchForm: FC<SearchFormProps> = ({
const resetSearch = async () => {
setIsLoading(true);
await clientLogger.info('reset_search');
location.href = routes.searchPage(organism, []);
location.href = location.pathname;
};

const lapisUrl = getLapisUrl(clientConfig, organism);
Expand Down

0 comments on commit 702f701

Please sign in to comment.