Extract generic data-explorer component
[arvados-workbench2.git] / src / views / project-panel / project-panel-selectors.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { TreeItem } from "../../components/tree/tree";
6 import { Project } from "../../models/project";
7 import { ProjectExplorerItem } from "../../views-components/project-explorer/project-explorer-item";
8
9 export const mapProjectTreeItem = (item: TreeItem<Project>): ProjectExplorerItem => ({
10     name: item.data.name,
11     type: item.data.kind,
12     owner: item.data.ownerUuid,
13     lastModified: item.data.modifiedAt,
14     uuid: item.data.uuid
15 });