Skip to content

Commit

Permalink
worked on the fix of explore organizations
Browse files Browse the repository at this point in the history
Signed-off-by: Nishad <[email protected]>
  • Loading branch information
nishad-ayanworks committed Oct 20, 2023
1 parent 61a7e6a commit 92fdfd7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
29 changes: 20 additions & 9 deletions src/components/publicProfile/WalletDetailQRLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
---

<div class="min-[320]:inline-block w-full md:flex rounded gap-2 bg-white">
Expand Down Expand Up @@ -72,24 +83,24 @@ interface UserObject {
</div>
}
</div>
{orgData?.org_agents.length > 0 ?
<div class="w-1/3 flex flex-col justify-center text-wrap p-2">
<!-- commented for future use -->
<!-- {
connectionInvitation
&& <div class="w-1/3 flex flex-col justify-center text-wrap p-2">
<div class="h-auto flex-col items-center p-4">
{ orgData?.org_agents &&
<div
class="bg-white p-4 border border-gray-200 rounded-lg shadow-sm dark:border-gray-700 overflow-hidden">
<CustomQRCode
client:load
size={180}
value={orgData?.org_agents[0]?.agent_invitations[0]?.connectionInvitation}
value={connectionInvitation.toString()}
/>
</div>
}
</div>
</div>
</div>
:
''
}
} -->

</div>


4 changes: 4 additions & 0 deletions src/pages/org/[org].astro
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,6 +25,7 @@ const orgUsersData = orgUsersFilterByRole?.map(
return users?.user;
},
);
---

<div class="max-h-fit">
Expand Down

0 comments on commit 92fdfd7

Please sign in to comment.