'use client' import Link from 'next/link' import { Button } from '@/components/ui/button' import { Alert, AlertDescription, AlertTitle } from '@/components/ui/alert' import { AlertCircle } from 'lucide-react' import type { RateLimitErrorData } from '@/lib/utils/errorHandler' interface RateLimitErrorProps { errorData?: RateLimitErrorData variant?: 'alert' | 'inline' className?: string } /** * Component for displaying rate limit (429) errors with upgrade option */ export function RateLimitError({ errorData, variant = 'alert', className, }: RateLimitErrorProps) { const message = errorData?.message || 'You have reached your usage limit.' if (variant === 'inline') { return (
{message}
or wait for your limit to reset
{message}