fix: balance card wrong oob swap
This commit is contained in:
parent
78047c7ee8
commit
91679c3aee
3 changed files with 9 additions and 13 deletions
|
|
@ -86,10 +86,12 @@ templ BalanceCard(spaceID string, balance int, oob bool) {
|
|||
<div
|
||||
id="balance-card"
|
||||
class="border rounded-lg p-4 bg-card text-card-foreground"
|
||||
hx-swap-oob?={ oob }
|
||||
hx-get={ "/app/spaces/" + spaceID + "/components/balance" }
|
||||
hx-trigger="sse:balance_changed"
|
||||
hx-swap="outerHTML"
|
||||
if oob {
|
||||
hx-swap-oob="true"
|
||||
}
|
||||
>
|
||||
<h2 class="text-lg font-semibold">Current Balance</h2>
|
||||
<p class={ "text-3xl font-bold", templ.KV("text-destructive", balance < 0) }>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue