diff --git a/src/components/ShowTrialCard.tsx b/src/components/ShowTrialCard.tsx index dc58483f8..e0d05d392 100644 --- a/src/components/ShowTrialCard.tsx +++ b/src/components/ShowTrialCard.tsx @@ -32,9 +32,15 @@ export default function ShowTrialCard({ const now = Date.now(); const remainingMs = trialExpiresAt - now; - const remainingDays = Math.max(0, Math.ceil(remainingMs / (1000 * 60 * 60 * 24))); + const remainingDays = Math.max( + 0, + Math.ceil(remainingMs / (1000 * 60 * 60 * 24)) + ); const totalMs = TRIAL_DURATION_DAYS * 24 * 60 * 60 * 1000; - const progressPct = Math.min(100, Math.max(0, ((now - (trialExpiresAt - totalMs)) / totalMs) * 100)); + const progressPct = Math.min( + 100, + Math.max(0, ((now - (trialExpiresAt - totalMs)) / totalMs) * 100) + ); // Inverted: full bar at start, drains to empty as trial ends const displayPct = 100 - progressPct; @@ -47,7 +53,7 @@ export default function ShowTrialCard({ @@ -56,7 +62,9 @@ export default function ShowTrialCard({

{remainingDays === 0 ? t("trialExpired") - : t("trialDaysLeftShort", { days: remainingDays })} + : t("trialDaysLeftShort", { + days: remainingDays + })}

@@ -69,16 +77,13 @@ export default function ShowTrialCard({ href={billingHref} className={cn( "group cursor-pointer block", - "rounded-md border bg-secondary p-2 py-3 w-full flex flex-col gap-2 text-sm", - "transition duration-200 ease-in-out hover:bg-secondary/80 dark:hover:bg-secondary/60" + "rounded-md border bg-secondary p-2 py-3 w-full flex flex-col gap-2 text-sm" )} >

- {remainingDays === 0 - ? t("trialExpired") - : t("trialActive")} + {remainingDays === 0 ? t("trialExpired") : t("trialActive")}

@@ -88,7 +93,7 @@ export default function ShowTrialCard({ ? t("trialHasEnded") : t("trialDaysRemaining", { count: remainingDays })} -
+
{t("trialGoToBilling")}