From 585cb5a53dc26488e7527c455c94a7505c349155 Mon Sep 17 00:00:00 2001 From: Shyam Prakash <106866225+shyamprakash123@users.noreply.github.com> Date: Tue, 7 Nov 2023 09:28:16 +0530 Subject: [PATCH] Added Loading component while the assets are being fetched. (#6532) --- src/Components/Assets/AssetsList.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Components/Assets/AssetsList.tsx b/src/Components/Assets/AssetsList.tsx index 593afdb137c..8c19928fbee 100644 --- a/src/Components/Assets/AssetsList.tsx +++ b/src/Components/Assets/AssetsList.tsx @@ -65,7 +65,7 @@ const AssetsList = () => { status: qParams.status || "", }; - useQuery(routes.listAssets, { + const { loading } = useQuery(routes.listAssets, { query: params, onResponse: ({ res, data }) => { if (res?.status === 200 && data) { @@ -176,7 +176,13 @@ const AssetsList = () => { ); let manageAssets = null; - if (assetsExist) { + if (loading) { + manageAssets = ( +