refactor if statement to ternary
This commit is contained in:
parent
637a06e985
commit
31f171e94a
1 changed files with 3 additions and 6 deletions
|
@ -185,13 +185,10 @@ export default class App extends Component {
|
||||||
<Service name={name} key={name} graph={graphs[name]} {...info}/>
|
<Service name={name} key={name} graph={graphs[name]} {...info}/>
|
||||||
))
|
))
|
||||||
|
|
||||||
let notice = null
|
|
||||||
const down = allServices.filter(([, { status }]) => !status)
|
const down = allServices.filter(([, { status }]) => !status)
|
||||||
|
const notice = down.length > 0
|
||||||
if (down.length !== 0) {
|
? <DegradedNotice services={objectFromEntries(down)}/>
|
||||||
// a service is down :(
|
: null
|
||||||
notice = <DegradedNotice services={objectFromEntries(down)}/>
|
|
||||||
}
|
|
||||||
|
|
||||||
metrics = (
|
metrics = (
|
||||||
<div className="services">
|
<div className="services">
|
||||||
|
|
Loading…
Reference in a new issue