1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { Dispatch } from "redux";
6 import { RootState } from "store/store";
7 import { unionize, UnionOf } from 'common/unionize';
9 export const bannerReducerActions = unionize({
14 export type BannerAction = UnionOf<typeof bannerReducerActions>;
16 export const openBanner = () =>
17 async (dispatch: Dispatch, getState: () => RootState) => {
18 dispatch(bannerReducerActions.OPEN_BANNER());
21 export const closeBanner = () =>
22 async (dispatch: Dispatch<any>, getState: () => RootState) => {
23 dispatch(bannerReducerActions.CLOSE_BANNER());