import { t } from 'i18next'; import React from 'react'; import { FaBug } from 'react-icons/fa'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from '../ui/tooltip'; type CWEItem = { id: string; size: number; }; type Props = { items: CWEItem[]; mostCommon: string; }; export const CWECloud: React.FC = ({ items, mostCommon }) => { items = items.filter(item => item.id !== ''); if (!items.length) { return (

{t('err.noMatchingRecords')}

); } return (

{t('mostCommon')}: {mostCommon}

{items.map(item => (

{item.id.split(' ')[0].replace(':', '')}

{t('occurrences')}: {item.size}

{item.id}

))}
); };