Skip to content

Commit

Permalink
Merge pull request #41 from nethmalds/main
Browse files Browse the repository at this point in the history
refactor: set new countdown
  • Loading branch information
nethmalds authored Sep 27, 2024
2 parents 62cc856 + 6af0fea commit 892761e
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/components/sections/countdown.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";
import { useState, useEffect } from "react";
import React from "react";
import type React from "react";
import Countdown from "react-countdown";
import Image from "next/image";
import backdrop from "@/assets/background 2.png";
Expand All @@ -23,7 +23,7 @@ const CountdownComponent: React.FC = () => {
setIsClient(true);
}, []);

const ieeeDay = new Date("2024-10-09T00:00:00");
const ieeeDay = new Date("2024-10-07T00:00:00");

const renderer = ({
days,
Expand All @@ -47,16 +47,15 @@ const CountdownComponent: React.FC = () => {
<CountdownItem value={"00"} label="SEC" />
</div>
);
} else {
return (
<div className="flex justify-center items-center space-x-4 sm:scale-[65%] md:scale-90">
<CountdownItem value={formatTime(days).toString()} label="DAYS" />
<CountdownItem value={formatTime(hours).toString()} label="HRS" />
<CountdownItem value={formatTime(minutes).toString()} label="MIN" />
<CountdownItem value={formatTime(seconds).toString()} label="SEC" />
</div>
);
}
return (
<div className="flex justify-center items-center space-x-4 sm:scale-[65%] md:scale-90">
<CountdownItem value={formatTime(days).toString()} label="DAYS" />
<CountdownItem value={formatTime(hours).toString()} label="HRS" />
<CountdownItem value={formatTime(minutes).toString()} label="MIN" />
<CountdownItem value={formatTime(seconds).toString()} label="SEC" />
</div>
);
};

if (!isClient) {
Expand Down

0 comments on commit 892761e

Please sign in to comment.