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}/>
|
||||
))
|
||||
|
||||
let notice = null
|
||||
const down = allServices.filter(([, { status }]) => !status)
|
||||
|
||||
if (down.length !== 0) {
|
||||
// a service is down :(
|
||||
notice = <DegradedNotice services={objectFromEntries(down)}/>
|
||||
}
|
||||
const notice = down.length > 0
|
||||
? <DegradedNotice services={objectFromEntries(down)}/>
|
||||
: null
|
||||
|
||||
metrics = (
|
||||
<div className="services">
|
||||
|
|
Loading…
Reference in a new issue