1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { unionize, ofType, UnionOf } from "~/common/unionize";
7 export const searchBarActions = unionize({
8 SET_CURRENT_VIEW: ofType<string>(),
9 OPEN_SEARCH_VIEW: ofType<{}>(),
10 CLOSE_SEARCH_VIEW: ofType<{}>()
13 export type SearchBarActions = UnionOf<typeof searchBarActions>;
15 export const goToView = (currentView: string) => searchBarActions.SET_CURRENT_VIEW(currentView);