Skip to content

Commit 1013f04

Browse files
committed
code review
1 parent 13f1a25 commit 1013f04

14 files changed

Lines changed: 17 additions & 15 deletions

File tree

apps/site/components/Common/Partners/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ import style from './index.module.css';
1515
type PartnersListProps = {
1616
size?: 'big' | 'small';
1717
category?: PartnerCategory;
18+
length: number;
1819
};
1920

2021
const PartnersList: FC<PartnersListProps> = async ({
2122
size = 'small',
2223
category,
24+
length,
2325
}) => {
2426
let partners = await providePartners();
2527

@@ -29,8 +31,8 @@ const PartnersList: FC<PartnersListProps> = async ({
2931
);
3032
}
3133

32-
if (size === 'small') {
33-
partners = partners.slice(0, 6);
34+
if (size === 'small' || length) {
35+
partners = partners.slice(0, length ?? 6);
3436
}
3537

3638
return (

apps/site/pages/en/download/current.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ or the <LinkWithArrow href="https://unofficial-builds.nodejs.org/download/">unof
4545
proudly due to the support of these partners, <Link href="/about/partners">and more</Link>.
4646
</span>
4747
<div className='mt-4'>
48-
<PartnersList size="big" category="infrastructure" />
48+
<PartnersList size="big" category="infrastructure" length={3} />
4949
</div>
5050
</section>

apps/site/pages/en/download/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ or the <LinkWithArrow href="https://unofficial-builds.nodejs.org/download/">unof
4545
proudly due to the support of these partners, <Link href="/about/partners">and more</Link>.
4646
</span>
4747
<div className='mt-4'>
48-
<PartnersList size="big" category="infrastructure" />
48+
<PartnersList size="big" category="infrastructure" length={3} />
4949
</div>
5050
</section>

apps/site/pages/fr/download/current.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Consultez nos binaires <LinkWithArrow href="https://nodejs.org/download/nightly/
4141
</span>
4242

4343
<div className="mt-4">
44-
<PartnersList size="big" category="infrastructure" />
44+
<PartnersList size="big" category="infrastructure" length={3} />
4545
</div>
4646
</section>

apps/site/pages/fr/download/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Consultez nos binaires <LinkWithArrow href="https://nodejs.org/download/nightly/
4141
</span>
4242

4343
<div className="mt-4">
44-
<PartnersList size="big" category="infrastructure" />
44+
<PartnersList size="big" category="infrastructure" length={3} />
4545
</div>
4646
</section>

apps/site/pages/id/download/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ atau biner <LinkWithArrow href="https://unofficial-builds.nodejs.org/download/">
4343
</span>
4444

4545
<div className="mt-4">
46-
<PartnersList size="big" category="infrastructure" />
46+
<PartnersList size="big" category="infrastructure" length={3} />
4747
</div>
4848
</section>

apps/site/pages/ja/download/current.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ title: Node.js®をダウンロードする
4141
</span>
4242

4343
<div className="mt-4">
44-
<PartnersList size="big" category="infrastructure" />
44+
<PartnersList size="big" category="infrastructure" length={3} />
4545
</div>
4646
</section>

apps/site/pages/ja/download/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ title: Node.js®をダウンロードする
4141
</span>
4242

4343
<div className="mt-4">
44-
<PartnersList size="big" category="infrastructure" />
44+
<PartnersList size="big" category="infrastructure" length={3} />
4545
</div>
4646
</section>

apps/site/pages/pt-br/download/current.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,6 @@ Confira nossos binários <LinkWithArrow href="https://nodejs.org/download/nightl
4141
</span>
4242

4343
<div className="mt-4">
44-
<PartnersList size="big" category="infrastructure" />
44+
<PartnersList size="big" category="infrastructure" length={3} />
4545
</div>
4646
</section>

apps/site/pages/pt-br/download/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ ou os binários <LinkWithArrow href="https://unofficial-builds.nodejs.org/downlo
4343
</span>
4444

4545
<div className="mt-4">
46-
<PartnersList size="big" category="infrastructure" />
46+
<PartnersList size="big" category="infrastructure" length={3} />
4747
</div>
4848
</section>

0 commit comments

Comments
 (0)