From 7fab6d73355435b53bbc6e135ee8d04a6a8c3d59 Mon Sep 17 00:00:00 2001 From: giancarlo Date: Sun, 14 Apr 2024 19:44:18 +0800 Subject: [PATCH] Refactor billing components and enhance UX This commit includes significant changes to the layout and presentation of billing related components. The most notable updates are replacing the static back button in 'billing-session-status.tsx' with a fully clickable link button, and improving the product description lookup to use i18n in 'current-subscription-card.tsx'. Additionally, the general structure and spacing of elements within 'billing/page.tsx' are enhanced for better user experience. --- .../home/[account]/billing/page.tsx | 38 +++++++++---------- .../src/components/billing-session-status.tsx | 18 ++++----- .../components/current-subscription-card.tsx | 13 ++++++- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/apps/web/app/(dashboard)/home/[account]/billing/page.tsx b/apps/web/app/(dashboard)/home/[account]/billing/page.tsx index 8dd519fd2..28217edfd 100644 --- a/apps/web/app/(dashboard)/home/[account]/billing/page.tsx +++ b/apps/web/app/(dashboard)/home/[account]/billing/page.tsx @@ -75,28 +75,24 @@ async function TeamAccountBillingPage({ params }: Params) { /> -
-
-
- - - - } - > - {(subscription) => ( - - )} - +
+ + + + } + > + {(subscription) => ( + + )} + - -
-
+
diff --git a/packages/billing/gateway/src/components/billing-session-status.tsx b/packages/billing/gateway/src/components/billing-session-status.tsx index 102e04192..5760deab7 100644 --- a/packages/billing/gateway/src/components/billing-session-status.tsx +++ b/packages/billing/gateway/src/components/billing-session-status.tsx @@ -78,17 +78,15 @@ function SuccessSessionStatus({

- + + + + ); diff --git a/packages/billing/gateway/src/components/current-subscription-card.tsx b/packages/billing/gateway/src/components/current-subscription-card.tsx index 8c65b0dbb..ff5d68436 100644 --- a/packages/billing/gateway/src/components/current-subscription-card.tsx +++ b/packages/billing/gateway/src/components/current-subscription-card.tsx @@ -65,7 +65,7 @@ export function CurrentSubscriptionCard({ - +
- {product.name} +
+ +
+

+ +

+
{/*