From b052ef9d3c9951b127f298c4cd704c22089c5812 Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Sun, 7 Jun 2026 23:36:11 +0000 Subject: [PATCH] Bob AI: Added a 5-minute countdown timer overlay to the hero image --- src/pages/HomePage/sections/Home.tsx | 96 +++++++++++++++++++++------- 1 file changed, 72 insertions(+), 24 deletions(-) diff --git a/src/pages/HomePage/sections/Home.tsx b/src/pages/HomePage/sections/Home.tsx index dc2ebc5..b305e73 100644 --- a/src/pages/HomePage/sections/Home.tsx +++ b/src/pages/HomePage/sections/Home.tsx @@ -1,30 +1,78 @@ -// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this -// file as the canonical source for the "home" section. - -import React from 'react'; -import HeroBillboard from '@/components/sections/hero/HeroBillboard'; -import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary"; +import React, { useState, useEffect } from 'react'; +import ButtonArrow from '@/components/ui/ButtonArrow'; +import AvatarGroup from '@/components/ui/AvatarGroup'; +import ImageOrVideo from '@/components/ui/ImageOrVideo'; +import ScrollReveal from '@/components/ui/ScrollReveal'; +import TextAnimation from '@/components/ui/TextAnimation'; +import { Clock } from 'lucide-react'; export default function HomeSection(): React.JSX.Element { + const [timeLeft, setTimeLeft] = useState(5 * 60); + + useEffect(() => { + const timer = setInterval(() => { + setTimeLeft((prev) => (prev > 0 ? prev - 1 : 0)); + }, 1000); + return () => clearInterval(timer); + }, []); + + const minutes = Math.floor(timeLeft / 60); + const seconds = timeLeft % 60; + return ( -
- - - +
+
+ + + + + + + +

+ Artisan breads, pastries, and custom cakes crafted with premium ingredients. Order online or visit us today. +

+
+ + +
+ + +
+
+ + +
+
+ +
+ + {/* Countdown Timer Overlay */} +
+
+ + Discount ends in +
+
+ {String(minutes).padStart(2, '0')}:{String(seconds).padStart(2, '0')} +
+
+
+
+
); } -- 2.49.1