Skip to content

Commit fc2ecdf

Browse files
committed
[React] Fix: hides guest accounts from linked profiles (#4687)
## Problem solved Short description of the bug fixed or feature added <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on hiding guest accounts from the linked profiles screen in React. ### Detailed summary - Excludes guest profiles from being displayed on the linked profiles screen - Updates the rendering logic to filter out guest profiles before displaying them > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 33936b3 commit fc2ecdf

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

.changeset/quiet-mangos-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
React: Hides guest accounts from linked profiles screen

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,16 @@ export function LinkedProfilesScreen(props: {
8888
</Text>
8989
</MenuButton>
9090
<Spacer y="xs" />
91-
{connectedProfiles?.map((profile) => (
92-
<LinkedProfile
93-
key={`${profile.type}-${getProfileDisplayName(profile)}`}
94-
profile={profile}
95-
client={props.client}
96-
/>
97-
))}
91+
{/* Exclude guest as a profile */}
92+
{connectedProfiles
93+
?.filter((profile) => profile.type !== "guest")
94+
.map((profile) => (
95+
<LinkedProfile
96+
key={`${profile.type}-${getProfileDisplayName(profile)}`}
97+
profile={profile}
98+
client={props.client}
99+
/>
100+
))}
98101
</Container>
99102
<Spacer y="md" />
100103
</Container>

0 commit comments

Comments
 (0)