21224: created global selected resource state Arvados-DCO-1.1-Signed-off-by: Lisa...
[arvados.git] / services / workbench2 / src / store / selected-resource / selected-resource-actions.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 export const selectedResourceActions = {
6     SET_SELECTED_RESOURCE: 'SET_SELECTED_RESOURCE',
7 }
8
9 type SelectedResourceAction = {
10     type: string;
11     payload: string;
12 };
13
14 export const setSelectedResource = (resourceUuid: string): SelectedResourceAction => ({
15     type: selectedResourceActions.SET_SELECTED_RESOURCE,
16     payload: resourceUuid
17 });