|
1 | 1 | import { useMemo } from 'preact/hooks' |
2 | | -import contributors from '../../contributors.json' |
| 2 | +import supporters from '../../supporters.json' |
3 | 3 | import { Card, ChangelogEntry, Footer, GeneratorCard, Giscus, ToolCard, ToolGroup } from '../components/index.js' |
4 | 4 | import { WhatsNewTime } from '../components/whatsnew/WhatsNewTime.jsx' |
5 | 5 | import { useLocale, useTitle } from '../contexts/index.js' |
6 | 6 | import { useAsync } from '../hooks/useAsync.js' |
7 | 7 | import { useMediaQuery } from '../hooks/useMediaQuery.js' |
8 | 8 | import { fetchChangelogs, fetchVersions, fetchWhatsNew } from '../services/DataFetcher.js' |
9 | 9 | import { Store } from '../Store.js' |
10 | | -import { shuffle } from '../Utils.js' |
11 | 10 |
|
12 | 11 | const MIN_FAVORITES = 2 |
13 | 12 | const MAX_FAVORITES = 5 |
@@ -153,32 +152,20 @@ function WhatsNew() { |
153 | 152 | } |
154 | 153 |
|
155 | 154 | function Contributors() { |
156 | | - const supporters = useMemo(() => { |
157 | | - return contributors.filter(c => c.types.includes('support') || c.types.includes('infrastructure')) |
158 | | - }, []) |
159 | | - |
160 | | - const otherContributors = useMemo(() => { |
161 | | - return shuffle(contributors.filter(c => !supporters.includes(c))) |
162 | | - }, []) |
163 | | - |
164 | 155 | return <div class="contributors"> |
165 | 156 | <h3>Supporters</h3> |
166 | 157 | <ContributorsList list={supporters} large /> |
167 | | - <h3>Contributors</h3> |
168 | | - <ContributorsList list={otherContributors} /> |
169 | 158 | </div> |
170 | 159 | } |
171 | 160 |
|
172 | 161 | interface ContributorsListProps { |
173 | | - list: typeof contributors |
| 162 | + list: typeof supporters |
174 | 163 | large?: boolean |
175 | 164 | } |
176 | 165 | function ContributorsList({ list, large }: ContributorsListProps) { |
177 | | - const { locale } = useLocale() |
178 | | - |
179 | 166 | return <div class={`contributors-list ${large ? 'contributors-large' : ''}`}> |
180 | 167 | {list.map((c) => |
181 | | - <a class="tooltipped tip-se" href={c.url} target="_blank" aria-label={`${c.name}\n${c.types.map(t => `• ${locale('contributor.' + t)}`).join('\n')}`}> |
| 168 | + <a class="tooltipped tip-se" href={c.url} target="_blank" aria-label={c.name}> |
182 | 169 | <img width={large ? 48 : 32} height={large ? 48 : 32} src={c.avatar} alt={c.name} loading="lazy" /> |
183 | 170 | </a> |
184 | 171 | )} |
|
0 commit comments