diff --git a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js index d18dae8..f3edc05 100644 --- a/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js +++ b/src/Club Membership & Upcoming Events/JoinTheClub/JoinTheClub.js @@ -1,4 +1,4 @@ -//import CountDown from "../../CountDown/CountDown"; +import CountDownTimer from "../../CountDown/CountDownTimer.js"; import "./JoinTheClub.css"; /** @@ -10,10 +10,16 @@ import "./JoinTheClub.css"; //semi-perminant email, do not need to respond but try to be a good alumni */ const JoinTheClub = () => { + const recuitmentDate = new Date(2024, 9, 17, 0, 0, 0, 0).getTime(); + //september 17 2024 + return ( -
+

Hello World

- {/* */} +
); }; diff --git a/src/CountDown/CountDown.js b/src/CountDown/CountDownTimer.js similarity index 56% rename from src/CountDown/CountDown.js rename to src/CountDown/CountDownTimer.js index 65c83d1..fe2c19a 100644 --- a/src/CountDown/CountDown.js +++ b/src/CountDown/CountDownTimer.js @@ -1,12 +1,12 @@ import { useEffect, useState } from "react"; -const CountDownTimer = ({ DateFinished, MessageDisplayAfter }) => { - const [days, hours, minutes, seconds] = 0; +const CountDownTimer = ({ dateFinished, messageDisplayAfter }) => { + const [days, hours, minutes, seconds] = useCountdown(dateFinished); if (days + hours + minutes + seconds <= 0) { return (
{ShowCounter(days, hours, minutes, seconds)} -

{MessageDisplayAfter}

+

{messageDisplayAfter}

); } else { @@ -44,36 +44,47 @@ const getReturnValues = (countDown) => { (countDown % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60) ); const minutes = Math.floor((countDown % (1000 * 60 * 60)) / (1000 * 60)); - const seconds = MAth.floor((countDown % (1000 * 60)) / 1000); + const seconds = Math.floor((countDown % (1000 * 60)) / 1000); return [days, hours, minutes, seconds]; }; const ShowCounter = ({ days, hours, minutes, seconds }) => { + let danger = days <= 3; return ( -
- - {DateTimeDisplay(days, "Days", days <= 3)} -

:

- {DateTimeDisplay(hours, "Hours", false)} -

:

- {DateTimeDisplay(minutes, "Mins", false)} -

:

- {DateTimeDisplay(seconds, "Seconds", false)} -
+
+ +

:

+ +

:

+ +

:

+
); }; -const DateTimeDisplay = ({ value, type, isDanger }) => { +const DateTimeDisplay = ({ valueAwayFrom, discriptor, isInDanger }) => { return ( -
-

{value}

- {type} +
+

{valueAwayFrom}

+ {discriptor}
); };