X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/818979d32a30f9b0bdbf5cee646124c131386d70..05cafa96eea1840c14bed54f5a726e2c79d48a98:/src/views/main-panel/main-panel-root.tsx diff --git a/src/views/main-panel/main-panel-root.tsx b/src/views/main-panel/main-panel-root.tsx index 2019f7bc..543e9c63 100644 --- a/src/views/main-panel/main-panel-root.tsx +++ b/src/views/main-panel/main-panel-root.tsx @@ -11,7 +11,6 @@ import { LoginPanel } from 'views/login-panel/login-panel'; import { InactivePanel } from 'views/inactive-panel/inactive-panel'; import { WorkbenchLoadingScreen } from 'views/workbench/workbench-loading-screen'; import { MainAppBar } from 'views-components/main-app-bar/main-app-bar'; -import { toggleSidePanel } from 'store/store'; type CssRules = 'root'; @@ -36,34 +35,38 @@ export interface MainPanelRootDataProps { sidePanelIsCollapsed: boolean; } -type MainPanelRootProps = MainPanelRootDataProps & WithStyles; +interface MainPanelRootDispatchProps { + toggleSidePanel: () => void +} + +type MainPanelRootProps = MainPanelRootDataProps & MainPanelRootDispatchProps & WithStyles; export const MainPanelRoot = withStyles(styles)( - (props: MainPanelRootProps | any) =>{ - const{ classes, loading, working, user, buildInfo, uuidPrefix, - isNotLinking, isLinkingPath, siteBanner, sessionIdleTimeout, sidePanelIsCollapsed: sidePanelIsCollapsed } = props - return loading + ({ classes, loading, working, user, buildInfo, uuidPrefix, + isNotLinking, isLinkingPath, siteBanner, sessionIdleTimeout, + sidePanelIsCollapsed, toggleSidePanel }: MainPanelRootProps) =>{ + return loading ? : <> - {isNotLinking && - {working - ? - : null} - } - - {user - ? (user.isActive || (!user.isActive && isLinkingPath) - ? - : ) - : } - - -} + {isNotLinking && + {working + ? + : null} + } + + {user + ? (user.isActive || (!user.isActive && isLinkingPath) + ? + : ) + : } + + + } );