From 07546576c18788af81567081ece36ad441cfc4fb Mon Sep 17 00:00:00 2001 From: Usman Baig Date: Sat, 28 Mar 2026 18:57:57 +0100 Subject: [PATCH] fix(pricing): default slider to first tier (10k) instead of third (100k) --- components/PricingSection.tsx | 2 +- lib/plans.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/PricingSection.tsx b/components/PricingSection.tsx index 053f94b..3047dd7 100644 --- a/components/PricingSection.tsx +++ b/components/PricingSection.tsx @@ -105,7 +105,7 @@ export default function PricingSection() { const searchParams = useSearchParams() const router = useRouter() const [isYearly, setIsYearly] = useState(false) - const [sliderIndex, setSliderIndex] = useState(2) // Default to 100k (index 2) + const [sliderIndex, setSliderIndex] = useState(0) // Default to 10k (index 0) const [loadingPlan, setLoadingPlan] = useState(null) const { user } = useAuth() diff --git a/lib/plans.ts b/lib/plans.ts index 0707111..1056804 100644 --- a/lib/plans.ts +++ b/lib/plans.ts @@ -33,11 +33,11 @@ export const TRAFFIC_TIERS = [ export function getTierIndexForLimit(limit: number): number { const idx = TRAFFIC_TIERS.findIndex((t) => t.value === limit) - return idx >= 0 ? idx : 2 + return idx >= 0 ? idx : 0 } export function getLimitForTierIndex(index: number): number { - if (index < 0 || index >= TRAFFIC_TIERS.length) return 100000 + if (index < 0 || index >= TRAFFIC_TIERS.length) return 10000 return TRAFFIC_TIERS[index].value }