Skip to content

Commit

Permalink
Fix some key errors (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
estrattonbailey authored Nov 17, 2023
1 parent c858b58 commit 0dfc039
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/view/com/lists/ProfileLists.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@ export function ProfileLists({
items = items.concat([EMPTY])
} else if (data?.pages) {
for (const page of data?.pages) {
items = items.concat(page.lists)
items = items.concat(
page.lists.map(l => ({
...l,
_reactKey: l.uri,
})),
)
}
}
if (isError && !isEmpty) {
Expand Down
8 changes: 4 additions & 4 deletions src/view/screens/Search/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,11 @@ function SearchScreenSuggestedFollows() {
),
)
).flat()

setSuggestions(
// dedupe
friendsOfFriends.filter(f => !friends.find(f2 => f.did === f2.did)),
const deduped = friendsOfFriends.filter(
(f, i) => friendsOfFriends.findIndex(f2 => f.did === f2.did) === i,
)

setSuggestions(deduped)
setDataUpdatedAt(Date.now())
}

Expand Down

0 comments on commit 0dfc039

Please sign in to comment.