diff --git a/src/components/Layout.tsx b/src/components/Layout.tsx index 2649b22..b5add84 100644 --- a/src/components/Layout.tsx +++ b/src/components/Layout.tsx @@ -4,6 +4,40 @@ import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; import SiteBackgroundSlot from "@/components/ui/SiteBackgroundSlot"; import { Outlet } from 'react-router-dom'; import { StyleProvider } from "@/components/ui/StyleProvider"; +import { useState, useEffect } from 'react'; +import { Timer } from 'lucide-react'; +import Button from '@/components/ui/Button'; + +function FloatingDiscount() { + const [timeLeft, setTimeLeft] = useState(300); + + useEffect(() => { + if (timeLeft <= 0) return; + const timer = setInterval(() => setTimeLeft(t => t - 1), 1000); + return () => clearInterval(timer); + }, [timeLeft]); + + const mins = Math.floor(timeLeft / 60); + const secs = timeLeft % 60; + + if (timeLeft <= 0) return null; + + return ( +