-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.tsx
More file actions
43 lines (36 loc) · 964 Bytes
/
index.tsx
File metadata and controls
43 lines (36 loc) · 964 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
'use client';
import type { FC } from 'react';
import usePartnersList from '#site/hooks/react-client/usePartnersList';
import { LOGO_PARTNERS } from '#site/next.partners.constants';
import type { PartnerCategory } from '#site/types';
import PartnerLogo from '../PartnerLogo';
import style from './index.module.css';
type PartnersLogoListProps = {
maxLength?: number;
categories?: PartnerCategory;
sort?: 'name' | 'weight';
};
const PartnersLogoList: FC<PartnersLogoListProps> = ({
maxLength = 3,
sort = 'weight',
categories,
}) => {
const { seedList, initialRenderer } = usePartnersList({
logos: LOGO_PARTNERS,
maxLength,
sort,
categories,
});
return (
<div className={style.partnersLogoList}>
{seedList.map((partner, index) => (
<PartnerLogo
{...partner}
key={index}
loading={initialRenderer.current}
/>
))}
</div>
);
};
export default PartnersLogoList;