Fix some key errors (#1951)

zio/stable
Eric Bailey 2023-11-17 11:34:27 -06:00 committed by GitHub
parent c858b58307
commit 0dfc039a47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -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) {

View File

@ -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())
}