File tree 1 file changed +10
-9
lines changed
src/routes/details/components/breakdown
1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -136,6 +136,8 @@ class BreakdownHeader extends React.Component<BreakdownHeaderProps, any> {
136
136
? orgUnitIdKey
137
137
: groupBy ;
138
138
139
+ const showClusterInfo = clusterInfoComponent && isClusterInfoToggleEnabled ;
140
+
139
141
return (
140
142
< header style = { styles . header } >
141
143
< Flex justifyContent = { { default : 'justifyContentSpaceBetween' } } style = { styles . headerContent } >
@@ -166,15 +168,14 @@ class BreakdownHeader extends React.Component<BreakdownHeaderProps, any> {
166
168
< Flex justifyContent = { { default : 'justifyContentSpaceBetween' } } style = { styles . perspectiveContainer } >
167
169
< FlexItem >
168
170
< Flex direction = { { default : 'column' } } >
169
- { description ||
170
- ( clusterInfoComponent && isClusterInfoToggleEnabled && (
171
- < FlexItem style = { styles . description } >
172
- { description }
173
- { clusterInfoComponent && isClusterInfoToggleEnabled ? (
174
- < span style = { ! description ? styles . clusterInfoContainer : undefined } > { clusterInfoComponent } </ span >
175
- ) : null }
176
- </ FlexItem >
177
- ) ) }
171
+ { ( description || showClusterInfo ) && (
172
+ < FlexItem style = { styles . description } >
173
+ { description }
174
+ { showClusterInfo ? (
175
+ < span style = { ! description ? styles . clusterInfoContainer : undefined } > { clusterInfoComponent } </ span >
176
+ ) : null }
177
+ </ FlexItem >
178
+ ) }
178
179
{ dataDetailsComponent && isClusterInfoToggleEnabled ? < FlexItem > { dataDetailsComponent } </ FlexItem > : null }
179
180
{ showCostDistribution && (
180
181
< FlexItem style = { styles . costDistribution } >
You can’t perform that action at this time.
0 commit comments