From e10a6ff14c00d5c53905451a51886290e615b870 Mon Sep 17 00:00:00 2001 From: Kartik Sharma Date: Sat, 13 Dec 2025 14:51:17 +0530 Subject: [PATCH] Change the design of subscription page. --- src/pages/Home/SubscriptionPlans.jsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/pages/Home/SubscriptionPlans.jsx b/src/pages/Home/SubscriptionPlans.jsx index cdf33454..6f62eba3 100644 --- a/src/pages/Home/SubscriptionPlans.jsx +++ b/src/pages/Home/SubscriptionPlans.jsx @@ -9,6 +9,7 @@ const SubscriptionPlans = () => { const [frequency, setFrequency] = useState(1); const { data, isLoading, isError, error } = useSubscription(frequency); const [loading, setLoading] = useState(false); + const [isOpen, setIsOpen] = useState(true); console.log(data); const frequencyLabel = (freq) => { switch (freq) { @@ -63,7 +64,7 @@ const SubscriptionPlans = () => {

{error.name}

) : ( - data.map((plan) => ( + data.map((plan, index) => (
{/* Header */} @@ -109,6 +110,7 @@ const SubscriptionPlans = () => { .map(([key, mod]) => { if (!mod || !mod.name) return null; + const isFirst = index === 0; return (
@@ -118,7 +120,7 @@ const SubscriptionPlans = () => { type="button" data-bs-toggle="collapse" data-bs-target={`#collapse-${plan.id}-${mod.id}`} - aria-expanded="true" + aria-expanded={`${isFirst ? "true" : "false"}`} aria-controls={`collapse-${plan.id}-${mod.id}`} > @@ -136,7 +138,7 @@ const SubscriptionPlans = () => {
@@ -164,8 +166,6 @@ const SubscriptionPlans = () => { })}
- - {/* Button */}
{
+ )) )}