X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/1fd27a3f5cbf1ac44f2f70e0abcfb7072ed43684..b676312f840c3f12855a4392afe90b275dd25b97:/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 ea3ad41c41..e5514d8ef6 100644 --- a/src/views/main-panel/main-panel-root.tsx +++ b/src/views/main-panel/main-panel-root.tsx @@ -35,34 +35,37 @@ 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 } = 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) + ? + : ) + : } + + + } );