From 1093f9da7e1b2eef1dea32d652a52ebb45d80c41 Mon Sep 17 00:00:00 2001 From: praveensastry Date: Wed, 10 Oct 2018 09:57:37 +1100 Subject: [PATCH] refactoring after review comments --- public/app/features/dashboard/dashgrid/DashboardRow.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/DashboardRow.tsx b/public/app/features/dashboard/dashgrid/DashboardRow.tsx index 751745fbd41..378cf4c2c7c 100644 --- a/public/app/features/dashboard/dashgrid/DashboardRow.tsx +++ b/public/app/features/dashboard/dashgrid/DashboardRow.tsx @@ -87,7 +87,7 @@ export class DashboardRow extends React.Component { const title = templateSrv.replaceWithText(this.props.panel.title, this.props.panel.scopedVars); const count = this.props.panel.panels ? this.props.panel.panels.length : 0; const panels = count === 1 ? 'panel' : 'panels'; - const editModeEnabled = this.dashboard.meta.canEdit === true; + const canEdit = this.dashboard.meta.canEdit === true; return (
@@ -98,7 +98,7 @@ export class DashboardRow extends React.Component { ({count} {panels}) - {this.dashboard.meta.canEdit === true && ( + {canEdit && (
@@ -113,7 +113,7 @@ export class DashboardRow extends React.Component {  
)} - {editModeEnabled &&
} + {canEdit &&
}
); }