Skip to content

Commit 2eb64c7

Browse files
committed
chore: resolve conflict
2 parents 6099b93 + cc36077 commit 2eb64c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+352
-242
lines changed

apps/site/app/[locale]/next-data/api-data/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export const GET = async () => {
4848
const deflatedSource = deflateSync(cleanedContent).toString('base64');
4949

5050
return {
51-
filename,
51+
filename: filename,
5252
pathname: getPathnameForApiFile(name, versionWithPrefix),
5353
content: deflatedSource,
5454
};

apps/site/app/[locale]/next-data/page-data/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ export const GET = async () => {
3535
const cleanedContent = parseRichTextIntoPlainText(matter(source).content);
3636

3737
// Deflates a String into a base64 string-encoded (zlib compressed)
38-
const deflatedSource = deflateSync(cleanedContent).toString('base64');
38+
const content = deflateSync(cleanedContent).toString('base64');
3939

4040
// Returns metadata of each page available on the Website
4141
return {
4242
filename,
4343
pathname,
4444
title,
4545
description,
46-
content: deflatedSource,
46+
content,
4747
};
4848
});
4949

apps/site/app/[locale]/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ const getPage: FC<DynamicParams> = async props => {
134134

135135
// Metadata and shared Context to be available through the lifecycle of the page
136136
const sharedContext = {
137-
frontmatter,
138-
headings,
137+
frontmatter: frontmatter,
138+
headings: headings,
139139
pathname: `/${pathname}`,
140-
readingTime,
141-
filename,
140+
readingTime: readingTime,
141+
filename: filename,
142142
};
143143

144144
// Defines a shared Server Context for the Client-Side

apps/site/components/Common/CodeBox.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
import { CodeBracketIcon } from '@heroicons/react/24/outline';
44
import BaseCodeBox from '@node-core/ui-components/Common/BaseCodeBox';
55
import styles from '@node-core/ui-components/Common/BaseCodeBox/index.module.css';
6+
import { useNotification } from '@node-core/ui-components/Providers/NotificationProvider';
67
import { useTranslations } from 'next-intl';
78
import type { FC, PropsWithChildren } from 'react';
89

910
import Link from '#site/components/Link';
10-
import { useCopyToClipboard, useNotification } from '#site/hooks';
11+
import { useCopyToClipboard } from '#site/hooks';
1112

1213
type CodeBoxProps = {
1314
language: string;

apps/site/components/Downloads/DownloadReleasesTable/index.tsx

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,22 @@ import DetailsButton from '#site/components/Downloads/DownloadReleasesTable/Deta
77
import Link from '#site/components/Link';
88
import getReleaseData from '#site/next-data/releaseData';
99

10+
const BADGE_KIND_MAP = {
11+
'End-of-life': 'warning',
12+
Maintenance: 'neutral',
13+
LTS: 'info',
14+
Current: 'default',
15+
Pending: 'default',
16+
} as const;
17+
18+
const BADGE_TEXT_MAP = {
19+
'End-of-life': 'End-of-Life (EOL)',
20+
Maintenance: 'Maintenance LTS',
21+
LTS: 'Active LTS',
22+
Current: 'Current',
23+
Pending: 'Pending',
24+
} as const;
25+
1026
const DownloadReleasesTable: FC = async () => {
1127
const releaseData = await getReleaseData();
1228

@@ -40,11 +56,8 @@ const DownloadReleasesTable: FC = async () => {
4056
<FormattedTime date={release.releaseDate} />
4157
</td>
4258
<td data-label="Status">
43-
<Badge
44-
kind={release.status === 'End-of-life' ? 'warning' : 'default'}
45-
size="small"
46-
>
47-
{release.status}
59+
<Badge kind={BADGE_KIND_MAP[release.status]} size="small">
60+
{BADGE_TEXT_MAP[release.status]}
4861
</Badge>
4962
</td>
5063
<td className="download-table-last">

apps/site/components/Downloads/Release/ReleaseCodeBox.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,7 @@ const ReleaseCodeBox: FC = () => {
116116
</AlertBox>
117117
</noscript>
118118

119-
<WithReleaseAlertBox
120-
status={release.status}
121-
link="/about/previous-releases"
122-
/>
119+
<WithReleaseAlertBox status={release.status} />
123120

124121
{release.status === 'LTS' && (
125122
<AlertBox

apps/site/components/Downloads/Release/VersionDropdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ const VersionDropdown: FC = () => {
3838
);
3939

4040
if (release?.status === 'LTS' && pathname.includes('current')) {
41-
redirect({ href: '/download', locale });
41+
redirect({ href: '/download', locale: locale });
4242
return;
4343
}
4444

4545
if (release?.status === 'Current' && !pathname.includes('current')) {
46-
redirect({ href: '/download/current', locale });
46+
redirect({ href: '/download/current', locale: locale });
4747
return;
4848
}
4949

apps/site/components/Downloads/ReleaseModal/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ const ReleaseModal: FC<ReleaseModalProps> = ({
4343
</LinkWithArrow>
4444
)}
4545

46-
<h5>{t('components.releaseModal.overview')}</h5>
47-
4846
<ReleaseOverview release={release} />
4947

5048
<h5>{t('components.releaseModal.minorVersions')}</h5>

apps/site/components/withAvatarGroup.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ const WithAvatarGroup: FC<WithAvatarGroupProps> = ({
2121
}) => (
2222
<AvatarGroup
2323
avatars={getAuthors({
24-
usernames: usernames,
25-
names: names,
26-
clickable: clickable,
24+
usernames,
25+
names,
26+
clickable,
2727
})}
2828
as={Link}
2929
{...props}

apps/site/components/withBreadcrumbs.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ const WithBreadcrumbs: FC<WithBreadcrumbsProps> = ({ navKeys = [] }) => {
5757
// Goes deeper on the tree of items if there are any.
5858
currentNode = items;
5959

60-
return label ? [...breadcrumbs, { label, href: link }] : breadcrumbs;
60+
return label
61+
? [...breadcrumbs, { label: label, href: link }]
62+
: breadcrumbs;
6163
}
6264

6365
return breadcrumbs;

0 commit comments

Comments
 (0)