Added removing files during upload feature
[arvados-workbench2.git] / src / views / main-panel / main-panel.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { RootState } from '~/store/store';
6 import { connect } from 'react-redux';
7 import { MainPanelRoot, MainPanelRootDataProps } from '~/views/main-panel/main-panel-root';
8 import { isSystemWorking } from '~/store/progress-indicator/progress-indicator-reducer';
9 import { isWorkbenchLoading } from '~/store/workbench/workbench-actions';
10 import { LinkAccountPanelStatus } from '~/store/link-account-panel/link-account-panel-reducer';
11 import { matchLinkAccountRoute } from '~/routes/routes';
12
13 const mapStateToProps = (state: RootState): MainPanelRootDataProps => {
14     return {
15         user: state.auth.user,
16         working: isSystemWorking(state.progressIndicator),
17         loading: isWorkbenchLoading(state),
18         buildInfo: state.appInfo.buildInfo,
19         uuidPrefix: state.auth.localCluster,
20         isNotLinking: state.linkAccountPanel.status === LinkAccountPanelStatus.NONE || state.linkAccountPanel.status === LinkAccountPanelStatus.INITIAL,
21         isLinkingPath:  state.router.location ? matchLinkAccountRoute(state.router.location.pathname) !== null : false
22     };
23 };
24
25 const mapDispatchToProps = null;
26
27 export const MainPanel = connect(mapStateToProps, mapDispatchToProps)(MainPanelRoot);