import Link from "next/link"; import type { ReactNode } from "react"; import { PRO_UPGRADE_REQUIRED_SUFFIX } from "@/lib/credits"; import { UPGRADE_URL } from "@/lib/plans"; import { UpgradeProButton } from "@/components/UpgradeProButton"; type Props = { className?: string; children?: ReactNode; }; export function UpgradeProLink({ className = "text-accent hover:underline", children }: Props) { return ( {children ?? "Upgrade to Pro"} ); } export function QuotaErrorMessage({ message }: { message: string }) { if (message.endsWith(PRO_UPGRADE_REQUIRED_SUFFIX)) { return ( <> {message.slice(0, -PRO_UPGRADE_REQUIRED_SUFFIX.length)}{" "} ); } return <>{message}; }