@@ -8,6 +8,7 @@ import RepoItem from './RepoItem'
88import { GLOBAL_TAG , MY_LANGUAGES_TAG , dateRanges } from 'src/config'
99import { trackCardLanguageSelect , trackCardDateRangeSelect } from 'src/lib/analytics'
1010import { FloatingFilter , InlineTextFilter } from 'src/components/Elements'
11+ import { filterUniqueEntries } from 'src/utils/DataEnhancement'
1112
1213export function GithubCard ( { meta, withAds } : CardPropsType ) {
1314 const { userSelectedTags, cardsSettings, setCardSettings } = useUserPreferences ( )
@@ -43,12 +44,14 @@ export function GithubCard({ meta, withAds }: CardPropsType) {
4344 const getIsLoading = ( ) => results . some ( ( result ) => result . isLoading )
4445
4546 const getData = ( ) => {
46- return results
47- . reduce ( ( acc : Repository [ ] , curr ) => {
48- if ( ! curr . data ) return acc
49- return [ ...acc , ...curr . data ]
50- } , [ ] )
51- . sort ( ( a , b ) => b . stars - a . stars )
47+ return filterUniqueEntries (
48+ results
49+ . reduce ( ( acc : Repository [ ] , curr ) => {
50+ if ( ! curr . data ) return acc
51+ return [ ...acc , ...curr . data ]
52+ } , [ ] )
53+ . sort ( ( a , b ) => b . stars - a . stars )
54+ )
5255 }
5356
5457 const renderItem = ( item : Repository , index : number ) => (
0 commit comments