foo
This commit is contained in:
parent
906895a323
commit
b59cfa6a7a
|
@ -57,7 +57,9 @@ export default function Payments() {
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setActivePlanId(subscription?.plan?.id ?? null);
|
const plan = plans.find(({ stripe }) => subscription?.plan?.id === stripe);
|
||||||
|
|
||||||
|
setActivePlanId(plan);
|
||||||
}, [subscription, setActivePlanId]);
|
}, [subscription, setActivePlanId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -75,7 +77,7 @@ export default function Payments() {
|
||||||
<div className="bg-white overflow-hidden shadow rounded-lg">
|
<div className="bg-white overflow-hidden shadow rounded-lg">
|
||||||
<div className="px-4 py-5 sm:p-6">
|
<div className="px-4 py-5 sm:p-6">
|
||||||
<dt className="text-sm font-medium text-gray-500 truncate">Subscription status</dt>
|
<dt className="text-sm font-medium text-gray-500 truncate">Subscription status</dt>
|
||||||
<dd className="mt-1 text-3xl font-semibold text-gray-900">{subscription?.status ?? "—"}</dd>
|
<dd className="mt-1 text-3xl font-semibold text-gray-900 capitalize">{subscription?.status ?? "—"}</dd>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Reference in New Issue