mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-13 05:28:02 +03:00
1efb813ed4
* fix(nvd): add hermes query specs to feed polling * fix(nvd): derive platform fallback from matched targets * fix(nvd): avoid arg overflow on full cve rescan * fix(feed): add other platform filter for nonstandard slugs * refactor(feed): centralize advisory platform badge mapping * fix(feed): share platform normalization and fix tab callback typing * refactor(feed): simplify platform descriptor fallback
20 lines
521 B
TypeScript
20 lines
521 B
TypeScript
import React from 'react';
|
|
import { getPlatformDescriptor } from '../utils/advisoryPlatforms';
|
|
|
|
interface AdvisoryPlatformBadgeProps {
|
|
platform: string;
|
|
className?: string;
|
|
}
|
|
|
|
export const AdvisoryPlatformBadge: React.FC<AdvisoryPlatformBadgeProps> = ({
|
|
platform,
|
|
className,
|
|
}) => {
|
|
const { label, classes } = getPlatformDescriptor(platform);
|
|
const badgeClasses = ['uppercase tracking-wide', classes, className]
|
|
.filter(Boolean)
|
|
.join(' ');
|
|
|
|
return <span className={badgeClasses}>{label}</span>;
|
|
};
|