import { Users } from 'lucide-react'; import { motion } from 'framer-motion'; import { GlassCard } from '../shared/GlassCard'; import { AnalyticsIconInfo } from '../shared/AnalyticsIconInfo'; import { CardIcon } from '../shared/CardIcon'; import { CardEmptyState } from '../shared/CardEmptyState'; import { StatusPill } from '../shared/StatusPill'; interface HumanLog { timestamp: string; source: string; url: string; ip: string; device?: string; browser?: string; os?: string; } interface HumanLogsCardProps { logs: HumanLog[]; className?: string; delay?: number; } function formatDate(ts: string) { if (!ts) return '—'; const d = new Date(ts); if (Number.isNaN(d.getTime())) return '—'; return d.toLocaleDateString(undefined, { month: 'short', day: 'numeric' }); } function deviceLabel(log: HumanLog) { const parts = [log.device, log.browser].filter((p) => p && p !== 'Unknown' && p !== 'unknown'); return parts.length > 0 ? parts.join(' · ') : '—'; } export function HumanLogsCard({ logs, className = '', delay = 0 }: HumanLogsCardProps) { return (
Recent human visitor events with IP, country, URL, device and date. Use this to sanity-check real user traffic alongside bot activity.

} >

Human Logs

IP Referral URL Device Date
{logs.length === 0 ? ( ) : ( logs.map((log, i) => ( {log.ip || '—'} {log.source && log.source.toLowerCase() !== 'direct' ? log.source : 'Direct'} {log.url} {deviceLabel(log)} {formatDate(log.timestamp)} )) )}
{logs.length > 0 ? (
) : null}
); }