import type { PlanInfo } from "../types/plan"; import { viralySsoUrl } from "../utils/sso"; interface Props { plan: PlanInfo; } export default function QuotaBar({ plan }: Props) { const pct = plan.channelsLimit > 0 ? Math.min(Math.round((plan.channelsUsed / plan.channelsLimit) * 100), 100) : 0; const barColor = pct >= 100 ? "#ef4444" : pct >= 67 ? "#f59e0b" : "#25e2b8"; const atLimit = plan.channelsUsed >= plan.channelsLimit; return (
{plan.channelsUsed} of{" "} {plan.channelsLimit} social profiles {plan.channelsLocked > 0 && ( ({plan.channelsLocked} locked) )} {plan.plan} Plan
{/* Progress bar */}
{/* Upgrade prompt */} {atLimit && (
You've reached your plan's profile limit. Upgrade
)}
); }