From 8fb1b7d964d128c28ddf0208e1a488f46136d501 Mon Sep 17 00:00:00 2001 From: Janicki Artur Date: Thu, 13 Sep 2018 09:48:22 +0200 Subject: [PATCH] change code after CR Feature #14137 Arvados-DCO-1.1-Signed-off-by: Janicki Artur --- .../side-panel-button/side-panel-button.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views-components/side-panel-button/side-panel-button.tsx b/src/views-components/side-panel-button/side-panel-button.tsx index f0543b4c..e39b3782 100644 --- a/src/views-components/side-panel-button/side-panel-button.tsx +++ b/src/views-components/side-panel-button/side-panel-button.tsx @@ -34,7 +34,7 @@ const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ interface SidePanelDataProps { currentItemId: string; - showButton: boolean; + buttonVisible: boolean; } interface SidePanelState { @@ -48,7 +48,7 @@ const transformOrigin: PopoverOrigin = { horizontal: 45 }; -const checkButtonVisibility = ({ router }: RootState) => { +const isButtonVisible = ({ router }: RootState) => { const pathname = router.location ? router.location.pathname : ''; const match = matchProjectRoute(pathname); return !!match; @@ -57,7 +57,7 @@ const checkButtonVisibility = ({ router }: RootState) => { export const SidePanelButton = withStyles(styles)( connect((state: RootState) => ({ currentItemId: getProperty(PROJECT_PANEL_CURRENT_UUID)(state.properties), - showButton: checkButtonVisibility(state) + buttonVisible: isButtonVisible(state) }))( class extends React.Component { @@ -66,10 +66,10 @@ export const SidePanelButton = withStyles(styles)( }; render() { - const { classes, showButton } = this.props; + const { classes, buttonVisible } = this.props; const { anchorEl } = this.state; return - {showButton && + {buttonVisible &&