'use client'; import Link from 'next/link'; import { useEffect, useState } from 'react'; import styles from './Hero.module.css'; export default function Hero() { const [currentSlide, setCurrentSlide] = useState(0); const [typedText, setTypedText] = useState(''); const slides = [ { id: 1, badge: 'New Feature', badgeText: 'AI-Powered Scheduling is here', title: 'Find your social media success.', subtitle: 'Your dream engagement is waiting for you. Manage all your accounts in one place.', ctaPrimary: 'Get Started', image: '/hero-slide-1.png' }, { id: 2, badge: 'Analytics', badgeText: 'Deep insights for growth', title: 'Analyze performance & boost reach.', subtitle: 'Track every click, like, and share with our advanced analytics dashboard.', ctaPrimary: 'Explore Analytics', image: '/hero-slide-2.png' }, { id: 3, badge: 'Community', badgeText: 'Join 10,000+ Creators', title: 'Connect with your audience instantly.', subtitle: 'Real-time engagement tools to keep your community active and growing.', ctaPrimary: 'Join Community', image: '/hero-slide-3.png' }, ]; // Typing effect for the title of the current slide useEffect(() => { const text = slides[currentSlide].title; setTypedText(''); let i = 0; const timer = setInterval(() => { if (i < text.length) { setTypedText((prev) => text.slice(0, i + 1)); i++; } else { clearInterval(timer); } }, 50); return () => clearInterval(timer); }, [currentSlide]); // Auto-slide useEffect(() => { const timer = setInterval(() => { setCurrentSlide((prev) => (prev + 1) % slides.length); }, 5000); return () => clearInterval(timer); }, []); const slide = slides[currentSlide]; return (
{/* Abstract Circles/Shapes like reference */}
{/* Left Content */}
{slide.badge} {slide.badgeText}

{typedText}|

{slide.subtitle}

{/* Search-like CTA Bar like Reference */}
✉️

We are Trusted by:

G
{/* Google */}
Be
{/* Behance */}
📷
{/* Insta */}
{/* Microsoft */}
{/* Right Content - Image & Floating Cards */}
{/* Using dynamic image from slide data */} {slide.title}
{/* Floating Card 1: Congrats */}
📩
Congrats! You have got an Email
{/* Floating Card 2: Jobholder / Users */}
10k+ Active Users
👩 👨 🧑 +
{/* Floating Card 3: Small Message */}
👱‍♀️
Hi,

I am looking for...

{/* Slider Indicators */}
{slides.map((_, idx) => (
); }