From c581618817840e836d27ed5543092107c91f7286 Mon Sep 17 00:00:00 2001 From: Hari Krishna Date: Tue, 5 Mar 2024 07:29:22 +0000 Subject: [PATCH] fixed few issues with the frontend --- frontend/src/views/Admin.jsx | 77 ++++++++++++++++++++---------------- 1 file changed, 42 insertions(+), 35 deletions(-) diff --git a/frontend/src/views/Admin.jsx b/frontend/src/views/Admin.jsx index 629b5a4b..63800693 100755 --- a/frontend/src/views/Admin.jsx +++ b/frontend/src/views/Admin.jsx @@ -206,8 +206,12 @@ const Admin = (props) => { }, [isDropzone]); useEffect(() => { - handleGetSubOrgs(userdata.active_org.id); - }, []); + if (userdata.orgs !== undefined && userdata.orgs !== null && userdata.orgs.length > 0) { + handleGetSubOrgs(userdata.active_org.id); + } + else console.log("error in user data") + }, [userdata]); + const isCloud = window.location.host === "localhost:3002" || window.location.host === "shuffler.io"; @@ -4770,10 +4774,10 @@ const handleClickChangeOrg = (orgId) => { /> {subOrgs.length > 0 ? ( - -
-

Your Sub Organizations of the Current Organization

-
+ +
+

Sub Organizations of the Current Organization

+
{ return ( - - - - - + + ); })}
- +) : ( +
+

No Sub-Organizations found for the Current Organization

+
+)} + + { }} /> -
-) : ( - - No Sub-Organizations available. - -)} -
-

All Tenants

-
+
+

All Tenants

+
- +