diff options
Diffstat (limited to 'src/components/ListItem.js')
| -rw-r--r-- | src/components/ListItem.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/components/ListItem.js b/src/components/ListItem.js index 2951c48..dcafe24 100644 --- a/src/components/ListItem.js +++ b/src/components/ListItem.js @@ -3,6 +3,8 @@ import React from "react"; import Button from "@mui/material/Button"; import Card from "@mui/material/Card"; +import { resultClassName } from "../util"; + class ListItem extends React.Component { render() { return ( @@ -26,15 +28,7 @@ class ListItem extends React.Component { <td>{this.props.system_name}</td> <td style={{ paddingRight: 0 }}> <Card - className={ - "result" + - (() => { - if (this.props.vulnerable) return " vulnerable"; - else if (this.props.investigation_needed) - return " investigation_needed"; - else return ""; - })() - } + className={resultClassName(this.props)} variant="outlined" > {this.props.display_name} |
