'use client' import { AlertTriangle } from 'lucide-react' import { cn } from '@/lib/utils' import { differenceInMinutes, parseISO } from 'date-fns' interface StaleDataBannerProps { lastUpdated: string thresholdMinutes?: number className?: string } export function StaleDataBanner({ lastUpdated, thresholdMinutes = 10, className, }: StaleDataBannerProps) { const minutesOld = differenceInMinutes(new Date(), parseISO(lastUpdated)) const isStale = minutesOld > thresholdMinutes if (!isStale) return null return (

Data may be outdated

Last updated {minutesOld} minutes ago. Live data may differ.

) }