-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Expand file tree
/
Copy pathindex.tsx
More file actions
36 lines (27 loc) · 829 Bytes
/
index.tsx
File metadata and controls
36 lines (27 loc) · 829 Bytes
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
import { create } from 'lts';
import provideReleaseSchedule from '#site/next-data/providers/releaseSchedule';
import type { FC } from 'react';
const MONTH = 30 * 24 * 3_600_000;
const ReleaseSchedule: FC = async () => {
const schedule = await provideReleaseSchedule();
// eslint-disable-next-line react-hooks/purity
const now = Date.now();
const threeMonthsAgo = new Date(now - 3 * MONTH);
const sixMonthsFromNow = new Date(now + 6 * MONTH);
const svg = create({
data: schedule,
queryStart: threeMonthsAgo,
queryEnd: sixMonthsFromNow,
animate: true,
excludeMain: false,
projectName: 'Node.js',
currentDateMarker: 'red',
});
return (
<div
dangerouslySetInnerHTML={{ __html: svg.html() }}
className="h-auto w-auto"
/>
);
};
export default ReleaseSchedule;