extracted-search-views-into-separete-components
[arvados.git] / src / store / structured-search / structured-search-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { unionize, ofType, UnionOf } from "~/common/unionize";
6
7 export const structuredSearchActions = unionize({
8     SET_CURRENT_VIEW: ofType<string>()
9 });
10
11 export type StructuredSearchActions = UnionOf<typeof structuredSearchActions>;
12
13 export const goToView = (currentView: string) => structuredSearchActions.SET_CURRENT_VIEW(currentView);