-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.tsx
More file actions
33 lines (28 loc) · 897 Bytes
/
index.tsx
File metadata and controls
33 lines (28 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { useTranslations } from 'next-intl';
import type { FC } from 'react';
import VulnerabilitiesTable from '#site/components/EOL/VulnerabilitiesTable';
import type { Vulnerability } from '#site/types/vulnerabilities';
const UnknownSeveritySection: FC<{
vulnerabilities: Array<Vulnerability>;
hasKnownVulns: boolean;
}> = ({ vulnerabilities, hasKnownVulns }) => {
const t = useTranslations();
if (!vulnerabilities.length) {
return null;
}
return (
<details open={!hasKnownVulns}>
<summary className="cursor-pointer font-semibold">
{t('components.eolModal.showUnknownSeverities')} (
{vulnerabilities.length})
</summary>
<div className="mt-4">
<VulnerabilitiesTable
vulnerabilities={vulnerabilities}
maxWidth={'max-w-3xs'}
/>
</div>
</details>
);
};
export default UnknownSeveritySection;