21224: fixed chips collapse test Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox...
[arvados.git] / services / workbench2 / src / store / file-viewers / file-viewers-selectors.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { PropertiesState, getProperty } from 'store/properties/properties';
6 import { FileViewerList } from 'models/file-viewers-config';
7
8 export const FILE_VIEWERS_PROPERTY_NAME = 'fileViewers';
9
10 export const DEFAULT_FILE_VIEWERS: FileViewerList = [];
11 export const getFileViewers = (state: PropertiesState) =>
12     getProperty<FileViewerList>(FILE_VIEWERS_PROPERTY_NAME)(state) || DEFAULT_FILE_VIEWERS;