Skip to content

Commit

Permalink
fix: runSearch hook pushHistory arguments corrected
Browse files Browse the repository at this point in the history
  • Loading branch information
geeky-abhishek committed May 4, 2022
1 parent ec60325 commit 4574af4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/search/run-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { QueryChip } from '../../types';
import { SEARCH_APP_ID } from '../constants';
import { pushHistory } from '../history/hooks';
import { useSearchStore } from './search-store';

export const runSearch = (query: Array<QueryChip>, module: string): void => {
useSearchStore.setState({ query, module, searchDisabled: false });
pushHistory({ route: module, path: '/' });
pushHistory({ route: SEARCH_APP_ID, path: `/${module}` });
};

0 comments on commit 4574af4

Please sign in to comment.