File tree Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Expand file tree Collapse file tree 1 file changed +20
-12
lines changed Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import { getLayout } from '~/components/SiteLayout' ;
3
3
import { SectionContext } from '~/context' ;
4
- import imageData from '~/data/community.json' ;
4
+ import imageData from '~/data/community-users .json' ;
5
5
import fs from 'fs' ;
6
6
import matter from 'gray-matter' ;
7
7
import readingTime from 'reading-time' ;
@@ -100,17 +100,25 @@ export default function communityPages(props: any) {
100
100
< div className = 'grid justify-center items-center gap-y-[10px]' >
101
101
< div className = 'grid justify-center mt-[50px] gap-y-[10px]' >
102
102
< div className = 'grid grid-cols-10 max-sm:grid-cols-7 gap-3' >
103
- { imageData . map ( ( avatar , index ) => (
104
- < Image
105
- key = { `${ avatar . id } -${ index } ` }
106
- src = { avatar . img }
107
- alt = { avatar . alt }
108
- width = { 35 }
109
- height = { 35 }
110
- title = { avatar . alt }
111
- className = 'sm:w-[40px] md:w-[45px] lg:w-[50px] sm:h-[40px] md:h-[45px] lg:h-[50px] rounded-full border-black'
112
- />
113
- ) ) }
103
+ { imageData
104
+ . filter (
105
+ ( contributor ) =>
106
+ contributor . login !== 'the-json-schema-bot[bot]' &&
107
+ contributor . login !== 'dependabot[bot]' ,
108
+ )
109
+ . sort ( ( ) => Math . random ( ) - 0.5 )
110
+ . slice ( 0 , 60 )
111
+ . map ( ( avatar , index ) => (
112
+ < Image
113
+ key = { `${ avatar . id } -${ index } ` }
114
+ src = { avatar . avatar_url }
115
+ alt = { avatar . login }
116
+ width = { 35 }
117
+ height = { 35 }
118
+ title = { avatar . login }
119
+ className = 'sm:w-[40px] md:w-[45px] lg:w-[50px] sm:h-[40px] md:h-[45px] lg:h-[50px] rounded-full border-black'
120
+ />
121
+ ) ) }
114
122
</ div >
115
123
</ div >
116
124
</ div >
You can’t perform that action at this time.
0 commit comments