forked from nodejs/nodejs.dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrelease-table.tsx
More file actions
50 lines (46 loc) · 1.3 KB
/
release-table.tsx
File metadata and controls
50 lines (46 loc) · 1.3 KB
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
44
45
46
47
48
49
50
import React from 'react';
import { ReleaseData } from '../hooks/useReleaseHistory';
interface Props {
releases: ReleaseData[];
}
const ReleaseTable = ({ releases }: Props): JSX.Element => {
return (
<table>
<thead>
<tr>
<td>Version</td>
<td>LTS</td>
<td>Date</td>
<td>V8</td>
<td>NPM</td>
<td>ABI</td>
<td>SHASUM</td>
</tr>
</thead>
<tbody>
{releases.map(
({ version, date, npm, v8, lts }: ReleaseData): JSX.Element => {
const majorVersion = version.substring(1).split('.')[0];
return (
<tr key={version}>
<td>{version}</td>
<td>{lts || ''}</td>
<td>{date}</td>
<td>{v8}</td>
<td>{npm}</td>
<td>ABI?</td>
<td>
<a href={`https://github.com/nodejs/node/blob/master/doc/changelogs/CHANGELOG_V${majorVersion}.md#${version.substring(1)}`}>Changelog</a>
</td>
<td>
<a href={`https://nodejs.org/download/release/${version}/`}>Download</a>
</td>
</tr>
);
}
)}
</tbody>
</table>
);
};
export default ReleaseTable;