Refactor frontend components and cleanup

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
SOC Analyst
2026-03-20 10:13:00 +01:00
parent 799e8f1c1e
commit bd423148e6
20 changed files with 61 additions and 1899 deletions

View File

@ -3,6 +3,7 @@ import { useEffect, useState } from 'react';
import { InfoTip } from './ui/Tooltip';
import { TIPS } from './ui/tooltips';
import { formatDateOnly } from '../utils/dateUtils';
import { getCountryFlag } from '../utils/countryUtils';
interface EntityStats {
entity_type: string;
@ -84,15 +85,7 @@ export function EntityInvestigationView() {
return labels[entityType] || entityType;
};
const getCountryFlag = (code: string) => {
const flags: Record<string, string> = {
CN: '🇨🇳', US: '🇺🇸', FR: '🇫🇷', DE: '🇩🇪', GB: '🇬🇧',
RU: '🇷🇺', CA: '🇨🇦', AU: '🇦🇺', JP: '🇯🇵', IN: '🇮🇳',
BR: '🇧🇷', IT: '🇮🇹', ES: '🇪🇸', NL: '🇳🇱', BE: '🇧🇪',
CH: '🇨🇭', SE: '🇸🇪', NO: '🇳🇴', DK: '🇩🇰', FI: '🇫🇮'
};
return flags[code] || code;
};
;
if (loading) {