summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
authorFrank <[email protected]>2026-01-23 11:21:08 -0500
committerFrank <[email protected]>2026-01-23 11:21:08 -0500
commit472695caca90c84fc1c7c9faae1ec7da19d0caae (patch)
tree8f24def9a3f0819ff5301279f43c3a7aa2e35126 /packages
parent469fd43c71b24f128c52e0b60584fd648350b325 (diff)
downloadopencode-472695caca90c84fc1c7c9faae1ec7da19d0caae.tar.gz
opencode-472695caca90c84fc1c7c9faae1ec7da19d0caae.zip
zen: fix balance not shown
Diffstat (limited to 'packages')
-rw-r--r--packages/console/app/src/routes/workspace/[id]/index.tsx31
1 files changed, 14 insertions, 17 deletions
diff --git a/packages/console/app/src/routes/workspace/[id]/index.tsx b/packages/console/app/src/routes/workspace/[id]/index.tsx
index fe308dbb0..15dc6087a 100644
--- a/packages/console/app/src/routes/workspace/[id]/index.tsx
+++ b/packages/console/app/src/routes/workspace/[id]/index.tsx
@@ -43,23 +43,20 @@ export default function () {
</span>
<Show when={userInfo()?.isAdmin}>
<span data-slot="billing-info">
- <Switch>
- <Match when={!billingInfo()?.customerID}>
- <button
- data-color="primary"
- data-size="sm"
- disabled={checkoutSubmission.pending || store.checkoutRedirecting}
- onClick={onClickCheckout}
- >
- {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"}
- </button>
- </Match>
- <Match when={!billingInfo()?.subscriptionID}>
- <span data-slot="balance">
- Current balance <b>${balance()}</b>
- </span>
- </Match>
- </Switch>
+ <Show when={billingInfo()?.customerID} fallback={
+ <button
+ data-color="primary"
+ data-size="sm"
+ disabled={checkoutSubmission.pending || store.checkoutRedirecting}
+ onClick={onClickCheckout}
+ >
+ {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"}
+ </button>
+ }>
+ <span data-slot="balance">
+ Current balance <b>${balance()}</b>
+ </span>
+ </Show>
</span>
</Show>
</p>