diff --git a/src/pages/HomePage/sections/Hero.tsx b/src/pages/HomePage/sections/Hero.tsx index e94e034..3df49c3 100644 --- a/src/pages/HomePage/sections/Hero.tsx +++ b/src/pages/HomePage/sections/Hero.tsx @@ -1,24 +1,149 @@ -// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this -// file as the canonical source for the "hero" section. +/* eslint-disable */ +// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body +import { useRef, useState, useEffect } from "react"; +import { motion, useScroll, useTransform, AnimatePresence } from "motion/react"; +import { cls } from "@/lib/utils"; +import Button from "@/components/ui/Button"; +import HeroBackgroundSlot from "@/components/ui/HeroBackgroundSlot"; +import TextAnimation from "@/components/ui/TextAnimation"; +import ImageOrVideo from "@/components/ui/ImageOrVideo"; +import AutoFillText from "@/components/ui/AutoFillText"; +import ScrollReveal from "@/components/ui/ScrollReveal"; -import React from 'react'; -import HeroBillboardBrandFloatingCards from "@/components/sections/hero/HeroBillboardBrandFloatingCards"; +const primaryButton = { + text: "Order Now", + href: "#order" +}; +const secondaryButton = { + text: "View Menu", + href: "#menu" +}; +const floatingCards = [ + { + imageSrc: "https://storage.googleapis.com/webild/default/templates/joes-coffee/hero/iced-coffee.webp", + name: "Americano" + }, + { + imageSrc: "https://storage.googleapis.com/webild/default/templates/joes-coffee/hero/latte.webp", + name: "Latte" + } +]; + +type FloatingCard = { + name: string; +} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); + +const CARD_CONFIG = [ + { position: "left", bottom: "30%", aspect: "aspect-3/4", movement: "-100%" }, + { position: "right", bottom: "14%", aspect: "aspect-square", movement: "-75%" }, +] as const; + +const slideshowImages = [ + "https://storage.googleapis.com/webild/default/templates/joes-coffee/menu/espresso.webp", + "https://storage.googleapis.com/webild/default/templates/joes-coffee/menu/latte.webp", + "https://storage.googleapis.com/webild/default/templates/joes-coffee/menu/cappuccino.webp", + "https://storage.googleapis.com/webild/default/templates/joes-coffee/menu/flat-white.webp" +]; + +type HeroBillboardBrandFloatingCardsProps = { + brand: string; + description: string; + primaryButton: { text: string; href: string }; + secondaryButton: { text: string; href: string }; + floatingCards: [FloatingCard, FloatingCard]; + textAnimation: "slide-up" | "fade-blur" | "fade"; +} & ({ imageSrc: string; videoSrc?: never } | { videoSrc: string; imageSrc?: never }); + +const HeroInline = () => { + const heroRef = useRef(null); + const { scrollYProgress } = useScroll({ + target: heroRef, + offset: ["start start", "end start"], + }); + const leftCardY = useTransform(scrollYProgress, [0, 1], ["0%", CARD_CONFIG[0].movement]); + const rightCardY = useTransform(scrollYProgress, [0, 1], ["0%", CARD_CONFIG[1].movement]); + const cardYTransforms = [leftCardY, rightCardY]; + + const [currentImageIndex, setCurrentImageIndex] = useState(0); + + useEffect(() => { + const interval = setInterval(() => { + setCurrentImageIndex((prev) => (prev + 1) % slideshowImages.length); + }, 3000); + return () => clearInterval(interval); + }, []); -export default function HeroSection(): React.JSX.Element { return ( -
- +
+ + + {floatingCards.map((card, i) => ( + +
+ +
+

{card.name}

+
+
+ ))} + +
+
+ {"Joe's Coffee"} + + + +
+
+
+ + +
+ + + + + +
+
+
+
+ ); +}; + +export default function HeroSection() { + return ( +
+ +
); }