From 92fdfd7ed542f79e65ba8d16b0acaeb506b77ab7 Mon Sep 17 00:00:00 2001 From: Nishad Date: Fri, 20 Oct 2023 17:10:08 +0530 Subject: [PATCH] worked on the fix of explore organizations Signed-off-by: Nishad --- .../publicProfile/WalletDetailQRLayout.astro | 29 +++++++++++++------ src/pages/org/[org].astro | 4 +++ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/components/publicProfile/WalletDetailQRLayout.astro b/src/components/publicProfile/WalletDetailQRLayout.astro index c44893c49..028d9af36 100644 --- a/src/components/publicProfile/WalletDetailQRLayout.astro +++ b/src/components/publicProfile/WalletDetailQRLayout.astro @@ -12,6 +12,17 @@ interface UserObject { walletName:string createDateTime:string } + +let connectionInvitation = '' + +if(orgData?.org_agents?.length > 0){ + const agents = orgData?.org_agents[0] + if(agents?.agent_invitations?.length > 0){ + connectionInvitation = agents?.agent_invitations[0].connectionInvitation + } + +} + ---
@@ -72,24 +83,24 @@ interface UserObject {
} -{orgData?.org_agents.length > 0 ? -
+ + +
diff --git a/src/pages/org/[org].astro b/src/pages/org/[org].astro index 615e3c04e..5e2df22e8 100644 --- a/src/pages/org/[org].astro +++ b/src/pages/org/[org].astro @@ -6,11 +6,14 @@ import OrgUserInfoLayout from '../../components/publicProfile/OrgUserInfoLayout. const { org } = Astro.params; const baseUrl = process.env.PUBLIC_BASE_URL || import.meta.env.PUBLIC_BASE_URL + const response = await fetch( `${baseUrl}/orgs/public-profiles/${org}`, ); + const data = await response?.json(); const orgData = data?.data; + const orgUsersFilterByRole = orgData?.userOrgRoles?.filter( (users: { orgRole: {name:string}; }) => { return users?.orgRole.name === "owner" @@ -22,6 +25,7 @@ const orgUsersData = orgUsersFilterByRole?.map( return users?.user; }, ); + ---