From 4be546db179b5abe9758836187c976d3f85382bc Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Tue, 29 Oct 2024 15:25:15 +0530 Subject: [PATCH] chore: improve loading screens --- .../src/components/Chain/View/ChainList.tsx | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/examples/buddybook/src/components/Chain/View/ChainList.tsx b/examples/buddybook/src/components/Chain/View/ChainList.tsx index da40388..cfc4263 100644 --- a/examples/buddybook/src/components/Chain/View/ChainList.tsx +++ b/examples/buddybook/src/components/Chain/View/ChainList.tsx @@ -98,6 +98,22 @@ const ChainList: React.FC = ({ chainsData, onChainUpdate, isLoad const rootBlocks = chainsData.filter(block => !block.parentBlockUUID); + if (isLoading) { + return ( + + + Loading Chains + + +
+ +

Fetching chains from the network...

+
+
+
+ ); + } + return ( @@ -112,7 +128,7 @@ const ChainList: React.FC = ({ chainsData, onChainUpdate, isLoad - {rootBlocks.length === 0 && !isLoading ? ( + {rootBlocks.length === 0 ? (

No chains found.

) : (