Skip to content

Commit

Permalink
make sure we've loaded data before showing details
Browse files Browse the repository at this point in the history
  • Loading branch information
futurepaul authored and TonyGiorgio committed Oct 31, 2023
1 parent 8fca28d commit 159c08b
Showing 1 changed file with 55 additions and 45 deletions.
100 changes: 55 additions & 45 deletions src/components/ActivityDetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -536,56 +536,66 @@ export function ActivityDetailsModal(props: {
</div>
<Dialog.Title>
<FancyCard>
<Switch>
<Match
when={kind() === "Lightning"}
>
<LightningHeader
info={
data() as MutinyInvoice
<Show when={data.latest}>
<Switch>
<Match
when={
kind() === "Lightning"
}
/>
</Match>
<Match
when={
kind() === "OnChain" ||
kind() === "ChannelOpen" ||
kind() === "ChannelClose"
}
>
<OnchainHeader
info={data() as OnChainTx}
kind={kind()}
/>
</Match>
</Switch>
>
<LightningHeader
info={
data() as MutinyInvoice
}
/>
</Match>
<Match
when={
kind() === "OnChain" ||
kind() ===
"ChannelOpen" ||
kind() ===
"ChannelClose"
}
>
<OnchainHeader
info={
data() as OnChainTx
}
kind={kind()}
/>
</Match>
</Switch>
</Show>
</FancyCard>
</Dialog.Title>
<Hr />
<Switch>
<Match when={kind() === "Lightning"}>
<LightningDetails
info={data() as MutinyInvoice}
tags={tags()}
/>
</Match>
<Match
when={
kind() === "OnChain" ||
kind() === "ChannelOpen"
}
>
<OnchainDetails
info={data() as OnChainTx}
kind={kind()}
tags={tags()}
/>
</Match>
<Match when={kind() === "ChannelClose"}>
<ChannelCloseDetails
info={data() as ChannelClosure}
/>
</Match>
<Show when={data.latest}>
<Match when={kind() === "Lightning"}>
<LightningDetails
info={data() as MutinyInvoice}
tags={tags()}
/>
</Match>
<Match
when={
kind() === "OnChain" ||
kind() === "ChannelOpen"
}
>
<OnchainDetails
info={data() as OnChainTx}
kind={kind()}
tags={tags()}
/>
</Match>
<Match when={kind() === "ChannelClose"}>
<ChannelCloseDetails
info={data() as ChannelClosure}
/>
</Match>
</Show>
</Switch>
</div>
</Suspense>
Expand Down

0 comments on commit 159c08b

Please sign in to comment.