Skip to content

Commit 79429bb

Browse files
committed
refactor: review
1 parent 62e16b3 commit 79429bb

File tree

1 file changed

+6
-6
lines changed
  • apps/site/components/Releases/ReleaseSchedule

1 file changed

+6
-6
lines changed

apps/site/components/Releases/ReleaseSchedule/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@ import provideReleaseSchedule from '#site/next-data/providers/releaseSchedule';
44

55
import type { FC } from 'react';
66

7+
const MONTH = 30 * 24 * 3_600_000;
8+
79
const ReleaseSchedule: FC = async () => {
810
const schedule = await provideReleaseSchedule();
911

10-
const now = new Date();
11-
12-
const threeMonthsAgo = new Date(now);
13-
threeMonthsAgo.setMonth(now.getMonth() - 3);
12+
// eslint-disable-next-line react-hooks/purity
13+
const now = Date.now();
1414

15-
const sixMonthsFromNow = new Date();
16-
sixMonthsFromNow.setMonth(now.getMonth() + 6);
15+
const threeMonthsAgo = new Date(now - 3 * MONTH);
16+
const sixMonthsFromNow = new Date(now + 6 * MONTH);
1717

1818
const svg = create({
1919
data: schedule,

0 commit comments

Comments
 (0)