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