-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.tsx
More file actions
73 lines (60 loc) · 1.98 KB
/
index.tsx
File metadata and controls
73 lines (60 loc) · 1.98 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {
CalendarIcon,
ClockIcon,
CodeBracketSquareIcon,
Square3Stack3DIcon,
} from '@heroicons/react/24/outline';
import NpmIcon from '@node-core/ui-components/Icons/PackageManager/Npm';
import { useTranslations } from 'next-intl';
import FormattedTime from '#site/components/Common/FormattedTime';
import type { NodeRelease } from '#site/types';
import type { FC } from 'react';
import ReleaseOverviewItem from './ReleaseOverviewItem';
import styles from './index.module.css';
type ReleaseOverviewProps = {
release: NodeRelease;
};
const ReleaseOverview: FC<ReleaseOverviewProps> = ({ release }) => {
const t = useTranslations();
return (
<div className={styles.root}>
<div className={styles.container}>
<ReleaseOverviewItem
Icon={CalendarIcon}
title={<FormattedTime date={release.initialReleaseDate} />}
subtitle={t('components.releaseOverview.firstReleased')}
/>
<ReleaseOverviewItem
Icon={ClockIcon}
title={<FormattedTime date={release.latestReleaseDate} />}
subtitle={t('components.releaseOverview.lastUpdated')}
/>
<ReleaseOverviewItem
Icon={Square3Stack3DIcon}
title={release.minorVersions.length}
subtitle={t('components.releaseOverview.minorVersions')}
/>
{release.modules && (
<ReleaseOverviewItem
Icon={CodeBracketSquareIcon}
title={`v${release.modules}`}
subtitle={t('components.releaseOverview.nApiVersion')}
/>
)}
{release.npm && (
<ReleaseOverviewItem
Icon={NpmIcon}
title={`v${release.npm}`}
subtitle={t('components.releaseOverview.npmVersion')}
/>
)}
<ReleaseOverviewItem
Icon={CodeBracketSquareIcon}
title={`v${release.v8}`}
subtitle={t('components.releaseOverview.v8Version')}
/>
</div>
</div>
);
};
export default ReleaseOverview;