Skip to content

Commit

Permalink
[React] Fix: hides guest accounts from linked profiles (#4687)
Browse files Browse the repository at this point in the history
## 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 -->
  • Loading branch information
gregfromstl committed Sep 23, 2024
1 parent 33936b3 commit fc2ecdf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/quiet-mangos-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"thirdweb": patch
---

React: Hides guest accounts from linked profiles screen
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,16 @@ export function LinkedProfilesScreen(props: {
</Text>
</MenuButton>
<Spacer y="xs" />
{connectedProfiles?.map((profile) => (
<LinkedProfile
key={`${profile.type}-${getProfileDisplayName(profile)}`}
profile={profile}
client={props.client}
/>
))}
{/* Exclude guest as a profile */}
{connectedProfiles
?.filter((profile) => profile.type !== "guest")
.map((profile) => (
<LinkedProfile
key={`${profile.type}-${getProfileDisplayName(profile)}`}
profile={profile}
client={props.client}
/>
))}

Check warning on line 100 in packages/thirdweb/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx

View check run for this annotation

Codecov / codecov/patch

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/LinkedProfilesScreen.tsx#L92-L100

Added lines #L92 - L100 were not covered by tests
</Container>
<Spacer y="md" />
</Container>
Expand Down

0 comments on commit fc2ecdf

Please sign in to comment.