mirror of
https://github.com/MeshCore-Beacon/beacon-web.git
synced 2026-10-23 20:22:39 +00:00
Reorder PacketExpansion to show errors before empty state
This commit is contained in:
1 parent
f400dc5f76
commit
64b822f4fa
2 files changed
+16
-8
No files matched your search
@@ -46,7 +46,14 @@ export function PacketExpansion({ packet, onOpenAnalyzer, onViewPath, selectedOb
|
||||
</div>
|
||||
|
||||
<div className="max-h-[360px] overflow-y-auto">
|
||||
{noObservations ? (
|
||||
{isError ? (
|
||||
<div className="flex items-center gap-3 text-[10px] text-danger py-2">
|
||||
<span>Failed to load observations</span>
|
||||
<button type="button" onClick={() => refetch()} className="border border-border rounded-sm px-2 py-0.5 bg-bg-raised cursor-pointer">
|
||||
Retry
|
||||
</button>
|
||||
</div>
|
||||
) : noObservations ? (
|
||||
emptyState
|
||||
) : isLoading ? (
|
||||
<div>
|
||||
@@ -58,13 +65,6 @@ export function PacketExpansion({ packet, onOpenAnalyzer, onViewPath, selectedOb
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
) : isError ? (
|
||||
<div className="flex items-center gap-3 text-[10px] text-danger py-2">
|
||||
<span>Failed to load observations</span>
|
||||
<button type="button" onClick={() => refetch()} className="border border-border rounded-sm px-2 py-0.5 bg-bg-raised cursor-pointer">
|
||||
Retry
|
||||
</button>
|
||||
</div>
|
||||
) : data && data.observations.length === 0 ? (
|
||||
emptyState
|
||||
) : data ? (
|
||||
|
||||
Reference in new issue
Block a user