Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Fixing time!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamziniii committed Feb 9, 2024
1 parent 4529cf7 commit a7a9f40
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/components/information.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,16 @@ function useTimer(deadline, interval = SECOND) {
}, [interval]);

return {
days: Math.floor(timespan / DAY),
hours: Math.floor((timespan / HOUR) % 24),
minutes: Math.floor((timespan / MINUTE) % 60),
seconds: Math.floor((timespan / SECOND) % 60)
days: Math.max(Math.floor(timespan / DAY), 0),
hours: Math.max(Math.floor((timespan / HOUR) % 24), 0),
minutes: Math.max(Math.floor((timespan / MINUTE) % 60), 0),
seconds: Math.max(Math.floor((timespan / SECOND) % 60), 0)
};
}




export default function Information() {
const { days, hours, minutes, seconds } = useTimer("2024-02-09T15:30:00");
const { days, hours, minutes, seconds } = useTimer("2024-02-10T22:30:36.004Z");

return(
<section className="bg-stars-pattern w-full min-h-[300px] py-4 pb-20 flex lg:flex-row flex-col lg:gap-0 gap-[50px] overflow-x-hidden bg-[length:300px_300px] ">
Expand All @@ -46,7 +44,7 @@ export default function Information() {
<h1 className=" animate-bounce lg:text-[50px] text-3xl">🚀</h1>
<h1 className=" text-[#FFCE6A] text-center drop-shadow-[0px_0px_7px_#FFCE6A] font-poppin lg:text-[50px]
text-3xl font-[500]">
Take Off In...</h1>
Landing In...</h1>
</div>
<motion.div
initial={{ opacity: 0, y:20 }}
Expand Down

0 comments on commit a7a9f40

Please sign in to comment.