diff --git a/src/components/admin/trafficUsage/TrafficIcons.tsx b/src/components/admin/trafficUsage/TrafficIcons.tsx new file mode 100644 index 0000000..78bf843 --- /dev/null +++ b/src/components/admin/trafficUsage/TrafficIcons.tsx @@ -0,0 +1,164 @@ +// ────────────────────────────────────────────────────────────────── +// TrafficIcons — the inline SVG set used across AdminTrafficUsage +// (header controls, filter buttons, sort indicator, etc.). Page-local +// in spirit; co-located here so the parent page imports a single +// flat barrel rather than redefining 15 inline icons. +// ────────────────────────────────────────────────────────────────── + +export const SearchIcon = () => ( + + + +); + +export const ChevronLeftIcon = () => ( + + + +); + +export const ChevronRightIcon = () => ( + + + +); + +export const RefreshIcon = ({ className = 'w-5 h-5' }: { className?: string }) => ( + + + +); + +export const DownloadIcon = () => ( + + + +); + +export const SortIcon = ({ direction }: { direction: false | 'asc' | 'desc' }) => ( + + {direction === 'asc' ? ( + + ) : direction === 'desc' ? ( + + ) : ( + + )} + +); + +export const FilterIcon = () => ( + + + +); + +export const ChevronDownIcon = () => ( + + + +); + +export const ServerIcon = () => ( + + + +); + +export const CalendarIcon = () => ( + + + +); + +export const XIcon = () => ( + + + +); + +export const StatusIcon = () => ( + + + +); + +export const GlobeIcon = () => ( + + + +); + +export const ShieldIcon = () => ( + + + +); + +export const ServerSmallIcon = () => ( + + + +); diff --git a/src/pages/AdminTrafficUsage.tsx b/src/pages/AdminTrafficUsage.tsx index 18c1963..f82a31b 100644 --- a/src/pages/AdminTrafficUsage.tsx +++ b/src/pages/AdminTrafficUsage.tsx @@ -32,168 +32,27 @@ import { formatGbPerDay, } from '../components/admin/trafficUsage/trafficUsageHelpers'; import { RiskBadge } from '../components/admin/trafficUsage/RiskBadge'; +import { + SearchIcon, + ChevronLeftIcon, + ChevronRightIcon, + RefreshIcon, + DownloadIcon, + SortIcon, + FilterIcon, + ChevronDownIcon, + ServerIcon, + CalendarIcon, + XIcon, + StatusIcon, + GlobeIcon, + ShieldIcon, + ServerSmallIcon, +} from '../components/admin/trafficUsage/TrafficIcons'; // (TanStack Table augmentation + utils + risk helpers moved into ./trafficUsage/trafficUsageHelpers.ts) -// ============ Icons ============ - -const SearchIcon = () => ( - - - -); - -const ChevronLeftIcon = () => ( - - - -); - -const ChevronRightIcon = () => ( - - - -); - -const RefreshIcon = ({ className = 'w-5 h-5' }: { className?: string }) => ( - - - -); - -const DownloadIcon = () => ( - - - -); - -const SortIcon = ({ direction }: { direction: false | 'asc' | 'desc' }) => ( - - {direction === 'asc' ? ( - - ) : direction === 'desc' ? ( - - ) : ( - - )} - -); - -const FilterIcon = () => ( - - - -); - -const ChevronDownIcon = () => ( - - - -); - -const ServerIcon = () => ( - - - -); - -const CalendarIcon = () => ( - - - -); - -const XIcon = () => ( - - - -); - -const StatusIcon = () => ( - - - -); - -const GlobeIcon = () => ( - - - -); - -const ShieldIcon = () => ( - - - -); - -const ServerSmallIcon = () => ( - - - -); +// (Icons moved into ./trafficUsage/TrafficIcons.tsx) // ============ Progress Bar ============