Skip to content

Commit 8b0771a

Browse files
move billing / manage subscription buttons to right
1 parent 510c904 commit 8b0771a

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

packages/web/src/app/[domain]/settings/billing/changeBillingEmailCard.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ export function ChangeBillingEmailCard({ currentUserRole }: ChangeBillingEmailCa
8383
<FormItem>
8484
<FormLabel>Email address</FormLabel>
8585
<FormControl>
86-
<Input
87-
placeholder={billingEmail}
86+
<Input
87+
placeholder={billingEmail}
8888
{...field}
8989
disabled={currentUserRole !== OrgRole.OWNER}
9090
title={currentUserRole !== OrgRole.OWNER ? "Only organization owners can change the billing email" : undefined}
@@ -94,14 +94,15 @@ export function ChangeBillingEmailCard({ currentUserRole }: ChangeBillingEmailCa
9494
</FormItem>
9595
)}
9696
/>
97-
<Button
98-
type="submit"
99-
className="w-full"
100-
disabled={isLoading || currentUserRole !== OrgRole.OWNER}
101-
title={currentUserRole !== OrgRole.OWNER ? "Only organization owners can change the billing email" : undefined}
102-
>
103-
{isLoading ? "Updating..." : "Update Billing Email"}
104-
</Button>
97+
<div className="flex justify-end">
98+
<Button
99+
type="submit"
100+
disabled={isLoading || currentUserRole !== OrgRole.OWNER}
101+
title={currentUserRole !== OrgRole.OWNER ? "Only organization owners can change the billing email" : undefined}
102+
>
103+
{isLoading ? "Updating..." : "Update Billing Email"}
104+
</Button>
105+
</div>
105106
</form>
106107
</Form>
107108
</CardContent>

packages/web/src/app/[domain]/settings/billing/manageSubscriptionButton.tsx

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ export function ManageSubscriptionButton({ currentUserRole }: { currentUserRole:
3131

3232
const isOwner = currentUserRole === OrgRole.OWNER
3333
return (
34-
<Button
35-
className="w-full"
36-
onClick={redirectToCustomerPortal}
37-
disabled={isLoading || !isOwner}
38-
title={!isOwner ? "Only the owner of the org can manage the subscription" : undefined}
39-
>
40-
{isLoading ? "Creating customer portal..." : "Manage Subscription"}
41-
</Button>
42-
)
34+
<div className="flex w-full justify-end">
35+
<Button
36+
onClick={redirectToCustomerPortal}
37+
disabled={isLoading || !isOwner}
38+
title={!isOwner ? "Only the owner of the org can manage the subscription" : undefined}
39+
>
40+
{isLoading ? "Creating customer portal..." : "Manage Subscription"}
41+
</Button>
42+
</div>
43+
)
4344
}

0 commit comments

Comments
 (0)