From 29a9aa4d6f8f5629dada3207a1cde723465ca332 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Tue, 29 Oct 2024 15:35:03 +0530 Subject: [PATCH] chore: use async generator for store queries to improve load times --- .../src/components/Chain/View/ChainList.tsx | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/examples/buddybook/src/components/Chain/View/ChainList.tsx b/examples/buddybook/src/components/Chain/View/ChainList.tsx index cfc4263..da40388 100644 --- a/examples/buddybook/src/components/Chain/View/ChainList.tsx +++ b/examples/buddybook/src/components/Chain/View/ChainList.tsx @@ -98,22 +98,6 @@ 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 ( @@ -128,7 +112,7 @@ const ChainList: React.FC = ({ chainsData, onChainUpdate, isLoad - {rootBlocks.length === 0 ? ( + {rootBlocks.length === 0 && !isLoading ? (

No chains found.

) : (