1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { connect } from 'react-redux';
6 import { ProjectsTreePicker, ProjectsTreePickerProps } from '~/views-components/projects-tree-picker/generic-projects-tree-picker';
7 import { Dispatch } from 'redux';
8 import { loadUserProject } from '~/store/tree-picker/tree-picker-actions';
9 import { ProjectIcon } from '~/components/icon/icon';
11 export const HomeTreePicker = connect(() => ({
12 rootItemIcon: ProjectIcon,
13 }), (dispatch: Dispatch): Pick<ProjectsTreePickerProps, 'loadRootItem'> => ({
14 loadRootItem: (_, pickerId, includeCollections, includeFiles) => {
15 dispatch<any>(loadUserProject(pickerId, includeCollections, includeFiles));
17 }))(ProjectsTreePicker);