diff --git a/src/app/page.tsx b/src/app/page.tsx index c472a4e..7609c14 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,11 +11,12 @@ import TestimonialCardFifteen from '@/components/sections/testimonial/Testimonia import FaqSplitMedia from '@/components/sections/faq/FaqSplitMedia'; import ContactFaq from '@/components/sections/contact/ContactFaq'; import FooterMedia from '@/components/sections/footer/FooterMedia'; -import { Award, Dumbbell, Phone, Trophy, Zap } from "lucide-react"; -import { useEffect, useRef } from "react"; +import { Award, Dumbbell, Phone, Trophy, Zap, Clock } from "lucide-react"; +import { useEffect, useRef, useState } from "react"; export default function LandingPage() { const brandListRef = useRef(null); + const [timeLeft, setTimeLeft] = useState("5:00"); useEffect(() => { if (!brandListRef.current) return; @@ -44,6 +45,25 @@ export default function LandingPage() { animateScroll(); }, []); + useEffect(() => { + const startTime = Date.now(); + const durationMs = 5 * 60 * 1000; // 5 minutes + + const updateTimer = () => { + const elapsed = Date.now() - startTime; + const remaining = Math.max(0, durationMs - elapsed); + const minutes = Math.floor(remaining / 60000); + const seconds = Math.floor((remaining % 60000) / 1000); + setTimeLeft(`${minutes}:${seconds.toString().padStart(2, '0')}`); + + if (remaining > 0) { + requestAnimationFrame(updateTimer); + } + }; + + updateTimer(); + }, []); + const brands = [ "Gold's Gym Partners", "Fitness Canada Certified", "NASM Certified", "ACE Certified", "ISSA Certified", "IIFYM Certified", "PN Level 1 Certified", "TRX Certified", "CrossFit Level 1", "NCCPT Certified" ]; @@ -226,6 +246,34 @@ export default function LandingPage() { /> + +
); -} \ No newline at end of file +}