zen: fix balance not shown

This commit is contained in:
Frank
2026-01-23 11:21:08 -05:00
parent 469fd43c71
commit 472695caca

View File

@@ -43,8 +43,7 @@ export default function () {
</span> </span>
<Show when={userInfo()?.isAdmin}> <Show when={userInfo()?.isAdmin}>
<span data-slot="billing-info"> <span data-slot="billing-info">
<Switch> <Show when={billingInfo()?.customerID} fallback={
<Match when={!billingInfo()?.customerID}>
<button <button
data-color="primary" data-color="primary"
data-size="sm" data-size="sm"
@@ -53,13 +52,11 @@ export default function () {
> >
{checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"} {checkoutSubmission.pending || store.checkoutRedirecting ? "Loading..." : "Enable billing"}
</button> </button>
</Match> }>
<Match when={!billingInfo()?.subscriptionID}>
<span data-slot="balance"> <span data-slot="balance">
Current balance <b>${balance()}</b> Current balance <b>${balance()}</b>
</span> </span>
</Match> </Show>
</Switch>
</span> </span>
</Show> </Show>
</p> </p>