mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2025-12-19 07:14:22 +01:00
don't block, use suspense
This commit is contained in:
@@ -37,7 +37,7 @@ export default function App() {
|
||||
<header class='text-sm font-semibold uppercase'>
|
||||
Activity
|
||||
</header>
|
||||
<For each={[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}>
|
||||
<For each={[1, 2, 3, 4]}>
|
||||
{() =>
|
||||
<Presence>
|
||||
<Motion
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Motion, Presence } from "@motionone/solid";
|
||||
import { MutinyBalance } from "@mutinywallet/node-manager";
|
||||
import { createResource, Show } from "solid-js";
|
||||
import { createResource, Show, Suspense } from "solid-js";
|
||||
|
||||
import { useNodeManager } from "~/state/nodeManagerState";
|
||||
import { ButtonLink } from "./Button";
|
||||
@@ -42,10 +42,12 @@ export default function BalanceBox() {
|
||||
</header>
|
||||
<div onClick={refetchBalance}>
|
||||
<h1 class='text-4xl font-light'>
|
||||
<Show when={balance()}>
|
||||
{/* TODO: no-non-null-asssertion but type narrowing just isn't working */}
|
||||
{prettyPrintBalance(balance()!)} <span class='text-xl'>SAT</span>
|
||||
</Show>
|
||||
<Suspense fallback={"..."}>
|
||||
<Show when={balance()}>
|
||||
{/* TODO: no-non-null-asssertion but type narrowing just isn't working */}
|
||||
{prettyPrintBalance(balance()!)} <span class='text-xl'>SAT</span>
|
||||
</Show>
|
||||
</Suspense>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="flex gap-2 py-4">
|
||||
|
||||
Reference in New Issue
Block a user