Skip to content

Commit cf31daf

Browse files
authored
fix: properly tag maintenance and flag versions correctly (#6586)
1 parent 327356b commit cf31daf

File tree

5 files changed

+8
-3
lines changed

5 files changed

+8
-3
lines changed

components/Downloads/Release/VersionDropdown.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ const getDropDownStatus = (version: string, status: string) => {
1616
return `${version} (Current)`;
1717
}
1818

19+
if (status === 'Maintenance') {
20+
return `${version} (Maintenance)`;
21+
}
22+
1923
return version;
2024
};
2125

components/withDownloadCategories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const WithDownloadCategories: FC<PropsWithChildren> = async ({ children }) => {
1717
const { page, category, subCategory } = getDownloadCategory(pathname);
1818

1919
const initialRelease: Array<NodeReleaseStatus> = pathname.includes('current')
20-
? ['Current']
20+
? ['Current', 'Maintenance']
2121
: ['Active LTS', 'Maintenance LTS'];
2222

2323
return (

next-data/generators/releaseData.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const getNodeReleaseStatus = (now, support) => {
1111
}
1212

1313
if (maintenanceStart && now > new Date(maintenanceStart)) {
14-
return 'Maintenance LTS';
14+
return ltsStart ? 'Maintenance LTS' : 'Maintenance';
1515
}
1616

1717
if (ltsStart && now > new Date(ltsStart)) {

pages/en/index.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ layout: home
2828
</>
2929
)}
3030
</WithNodeRelease>
31-
<WithNodeRelease status={"Current"}>
31+
<WithNodeRelease status={["Current", "Maintenance"]}>
3232
{({ release }) => (
3333
<small>
3434
Want new features sooner?

types/releases.ts

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export type NodeReleaseStatus =
22
| 'Maintenance LTS'
3+
| 'Maintenance'
34
| 'Active LTS'
45
| 'Current'
56
| 'End-of-life'

0 commit comments

Comments
 (0)