Skip to content

Commit d816fdb

Browse files
committed
feat: display countdown
1 parent d4c93c5 commit d816fdb

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

src/views/Home/components/Home/Home.tsx

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Countdown from "react-countdown";
2-
import React, {FC, useState} from "react";
2+
import React, {FC} from "react";
33
import LessThanIcon from "../../../../assets/images/MoreThanBlueWhiteIcon.svg";
44
import SectionWrapper
55
from "../../../../components/SectionWrapper/SectionWrapper";
@@ -24,17 +24,12 @@ import ActionButtons from "../ActionButtons/ActionButtons";
2424
import {Color} from "../../../../styles/colors";
2525
import InfoButtons from "../InfoButtons/InfoButtons";
2626
import {formatDateRange} from "./DateUtil";
27-
import {useEventEdition} from "../../UseEventEdition";
2827
import {Link} from "react-router-dom";
29-
import data from "../../../../data/2025.json";
30-
import {Edition} from "../../../../types/types";
28+
import edition from "../../../../data/2025.json";
3129
import CountDownCompleted from "./components/CountDownCompleted";
3230

3331
const Home: FC<React.PropsWithChildren<unknown>> = () => {
3432
const {width} = useWindowSize();
35-
const [edition, setEdition] = useState<Edition>();
36-
37-
useEventEdition(setEdition);
3833

3934
return (
4035
<StyledHomeImage>
@@ -94,11 +89,9 @@ const Home: FC<React.PropsWithChildren<unknown>> = () => {
9489
{edition?.tracks}
9590
</StyledSubtitle>
9691
</StyledTitleContainer>
97-
{data.showCountdown &&
98-
<Countdown date={edition?.startDay}
99-
onComplete={CountDownCompleted}
100-
renderer={TimeCountDown}/>
101-
}
92+
<Countdown date={edition?.startDay}
93+
onComplete={CountDownCompleted}
94+
renderer={TimeCountDown}/>
10295
{edition?.actionButtons && <ActionButtons/>}
10396
{edition?.showInfoButtons && <InfoButtons/>}
10497

0 commit comments

Comments
 (0)