1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { unionize, ofType, UnionOf } from '~/common/unionize';
6 import { Dispatch } from 'redux';
7 import { RootState } from '~/store/store';
8 import { ServiceRepository } from '~/services/services';
9 import { getBuildInfo } from '~/common/app-info';
11 export const appInfoActions = unionize({
12 SET_BUILD_INFO: ofType<string>()
15 export type AppInfoAction = UnionOf<typeof appInfoActions>;
17 export const setBuildInfo = () =>
18 (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) =>
19 dispatch(appInfoActions.SET_BUILD_INFO(getBuildInfo()));