1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { RootState } from '~/store/store';
6 import { Dispatch } from 'redux';
7 import { connect } from 'react-redux';
9 SiteManagerPanelRoot, SiteManagerPanelRootActionProps,
10 SiteManagerPanelRootDataProps
11 } from "~/views/site-manager-panel/site-manager-panel-root";
12 import { Session } from "~/models/session";
13 import { toggleSession } from "~/store/auth/auth-action-session";
15 const mapStateToProps = (state: RootState): SiteManagerPanelRootDataProps => {
17 sessions: state.auth.sessions
21 const mapDispatchToProps = (dispatch: Dispatch): SiteManagerPanelRootActionProps => ({
22 toggleSession: (session: Session) => {
23 dispatch<any>(toggleSession(session));
27 export const SiteManagerPanel = connect(mapStateToProps, mapDispatchToProps)(SiteManagerPanelRoot);