diff --git a/src/pages/Account.tsx b/src/pages/Account.tsx index 0a40fdc..08dfcbf 100644 --- a/src/pages/Account.tsx +++ b/src/pages/Account.tsx @@ -363,26 +363,90 @@ const Account = () => {

Mitt abonnemang

-
-

- Du har för närvarande inget aktivt abonnemang. -

- -
+ {subscription ? ( +
+
+
+
+ Ditt abonnemang +
+
+ {subscription.kg_per_week ?? "—"} kg / vecka +
+ {subscription.monthly_amount && ( +
+ {Math.round(subscription.monthly_amount * 1.25).toLocaleString("sv-SE")} kr/mån ink moms + {" · "} + {subscription.collection_method === "send_invoice" ? "Faktura" : "Kort"} +
+ )} +
+ + {subscription.cancel_at_period_end + ? "Avslutas vid periodens slut" + : subscription.status === "active" + ? "Aktiv" + : subscription.status === "trialing" + ? "Provperiod" + : subscription.status === "past_due" + ? "Obetald – Stripe försöker igen" + : subscription.status === "canceled" + ? "Avslutad" + : subscription.status} + +
+ + {subscription.current_period_end && ( +

+ {subscription.cancel_at_period_end || subscription.status === "canceled" + ? "Sista leveransperiod till: " + : "Nästa förnyelse: "} + {new Date(subscription.current_period_end).toLocaleDateString("sv-SE")} +

+ )} + + +

+ Ändra kort, ladda ner fakturor eller säg upp — tillgång kvar till periodens slut. +

+
+ ) : ( +
+

+ Du har för närvarande inget aktivt abonnemang. +

+ +
+ )}