fix: only display xray results if vulns > 0 (#11989)

This commit is contained in:
Jon Ayers
2024-02-02 11:02:46 -06:00
committed by GitHub
parent 6593de3c73
commit 73c5993bea
+4 -1
View File
@@ -9,7 +9,8 @@ interface XRayScanAlertProps {
}
export const XRayScanAlert: FC<XRayScanAlertProps> = ({ scan }) => {
return (
const display = scan.critical > 0 || scan.high > 0 || scan.medium > 0;
return display ? (
<div role="alert" css={styles.root}>
<ExternalImage
alt="JFrog logo"
@@ -50,6 +51,8 @@ export const XRayScanAlert: FC<XRayScanAlertProps> = ({ scan }) => {
</Button>
</div>
</div>
) : (
<></>
);
};