From b59cfa6a7af437b8ba595d04ea12dc2b0fdb3a1d Mon Sep 17 00:00:00 2001 From: Karol Wypchlo Date: Thu, 25 Feb 2021 16:51:38 +0100 Subject: [PATCH] foo --- packages/dashboard/src/pages/payments.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/dashboard/src/pages/payments.js b/packages/dashboard/src/pages/payments.js index 8c26d12a..df8c676b 100644 --- a/packages/dashboard/src/pages/payments.js +++ b/packages/dashboard/src/pages/payments.js @@ -57,7 +57,9 @@ export default function Payments() { }; useEffect(() => { - setActivePlanId(subscription?.plan?.id ?? null); + const plan = plans.find(({ stripe }) => subscription?.plan?.id === stripe); + + setActivePlanId(plan); }, [subscription, setActivePlanId]); return ( @@ -75,7 +77,7 @@ export default function Payments() {
Subscription status
-
{subscription?.status ?? "—"}
+
{subscription?.status ?? "—"}