Skip to content

Commit 472695c

Browse files
committed
zen: fix balance not shown
1 parent 469fd43 commit 472695c

1 file changed

Lines changed: 14 additions & 17 deletions

File tree

  • packages/console/app/src/routes/workspace/[id]

packages/console/app/src/routes/workspace/[id]/index.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,23 +43,20 @@ export default function () {
4343
</span>
4444
<Show when={userInfo()?.isAdmin}>
4545
<span data-slot="billing-info">
46-
<Switch>
47-
<Match when={!billingInfo()?.customerID}>
48-
<button
49-
data-color="primary"
50-
data-size="sm"
51-
disabled={checkoutSubmission.pending || store.checkoutRedirecting}
52-
onClick={onClickCheckout}
53-
>
54-
{checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"}
55-
</button>
56-
</Match>
57-
<Match when={!billingInfo()?.subscriptionID}>
58-
<span data-slot="balance">
59-
Current balance <b>${balance()}</b>
60-
</span>
61-
</Match>
62-
</Switch>
46+
<Show when={billingInfo()?.customerID} fallback={
47+
<button
48+
data-color="primary"
49+
data-size="sm"
50+
disabled={checkoutSubmission.pending || store.checkoutRedirecting}
51+
onClick={onClickCheckout}
52+
>
53+
{checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"}
54+
</button>
55+
}>
56+
<span data-slot="balance">
57+
Current balance <b>${balance()}</b>
58+
</span>
59+
</Show>
6360
</span>
6461
</Show>
6562
</p>

0 commit comments

Comments
 (0)