Skip to content

Commit 89beb3c

Browse files
authored
enhance manage billing visibility in dashboard (#5990)
1 parent 3b98fbf commit 89beb3c

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

apps/dashboard/src/app/components/Header/SecondaryNav/account-button.client.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,14 @@ export function AccountButton(props: {
6666
</div>
6767

6868
<div className="flex flex-col gap-1 p-2">
69+
<Button
70+
asChild
71+
variant="ghost"
72+
className="justify-start px-3 text-muted-foreground text-sm hover:text-foreground"
73+
>
74+
<Link href="/team/~/~/settings/billing">Manage Billing</Link>
75+
</Button>
76+
6977
<Button
7078
asChild
7179
variant="ghost"

apps/dashboard/src/components/settings/Account/Billing/index.tsx

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { redirectToBillingPortal, redirectToCheckout } from "@/actions/billing";
22
import type { Team } from "@/api/team";
33
import type { TeamSubscription } from "@/api/team-subscription";
4+
import {} from "@/components/ui/alert";
5+
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert";
46
import type { Account } from "@3rdweb-sdk/react/hooks/useApi";
7+
import {} from "@chakra-ui/react";
8+
import { AlertCircleIcon } from "lucide-react";
9+
import Link from "next/link";
510
import { PlanInfoCard } from "../../../../app/team/[team_slug]/(team)/~/settings/billing/components/PlanInfoCard";
611
import { getValidTeamPlan } from "../../../../app/team/components/TeamHeader/getValidTeamPlan";
712
import { CouponSection } from "./CouponCard";
@@ -28,16 +33,38 @@ export const Billing: React.FC<BillingProps> = ({
2833

2934
return (
3035
<div className="flex flex-col gap-12">
36+
<Alert variant="info">
37+
<AlertCircleIcon className="size-5" />
38+
<AlertTitle>Manage your plan</AlertTitle>
39+
<AlertDescription className="leading-relaxed">
40+
<span>
41+
Adjust your plan here to avoid unnecessary charges. For details, see{" "}
42+
</span>
43+
<span>
44+
<Link
45+
href="https://portal.thirdweb.com/account/billing/manage-billing"
46+
target="_blank"
47+
className="underline underline-offset-2 hover:text-foreground"
48+
>
49+
{" "}
50+
how to manage billing
51+
</Link>{" "}
52+
</span>
53+
</AlertDescription>
54+
</Alert>
3155
<PlanInfoCard
3256
team={team}
3357
subscriptions={subscriptions}
3458
redirectToBillingPortal={redirectToBillingPortal}
3559
/>
3660

3761
<div>
38-
<h2 className="font-semibold text-2xl tracking-tight">
62+
<h2 className="mb-2 font-semibold text-2xl tracking-tight">
3963
{validPlan === "free" ? "Select a Plan" : "Plans"}
4064
</h2>
65+
<p className="text-muted-foreground">
66+
Upgrade or downgrade your plan here to better fit your needs.
67+
</p>
4168
<div className="h-3" />
4269
<BillingPricing
4370
team={team}

0 commit comments

Comments
 (0)