Skip to content

Commit

Permalink
πŸ‘” Remove duplicate recommendations
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraHuang22 authored and williamchong committed Sep 4, 2024
1 parent 7eb0be1 commit b532e62
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mixins/nft.js
Original file line number Diff line number Diff line change
Expand Up @@ -675,8 +675,9 @@ export default {
item =>
!userCollected.some(
collectedItem => collectedItem.classId === item.classId
) && item.classId !== this.classId
)
);

if (hiddenSet) {
recommendedList = recommendedList.filter(
item => !hiddenSet.has(item.classId)
Expand All @@ -692,6 +693,10 @@ export default {
);
}

recommendedList = recommendedList.filter(
item => item.classId !== this.classId
);

if (this.nftIsNFTBook) {
const sortedList = [...recommendedList];
sortedList.sort((a, b) => {
Expand Down

0 comments on commit b532e62

Please sign in to comment.