'use client'; import React, { useState, useEffect } from 'react'; import Link from 'next/link'; interface HeroContent { headline: string; subheadline: string; cta_text: string; cta_link: string; badge_text: string; } const DEFAULT_HERO_CONTENT: HeroContent = { headline: 'Know what your ride is doing.', subheadline: 'MotorSignal turns every ride into clear, actionable insight: real-time lean angle, live GPS track telemetry on the road, post-session performance replay, and enterprise security for riders and clubs.', cta_text: 'Create your account', cta_link: '/register', badge_text: '⚡ Next-Gen Telemetry Engine 3.0 • Real-Time CAN-Bus & GPS', }; export default function HeroSection() { const [content, setContent] = useState(DEFAULT_HERO_CONTENT); useEffect(() => { fetch('/api/cms/homepage_hero') .then((res) => (res.ok ? res.json() : null)) .then((data) => { if (data?.published) { setContent((prev) => ({ ...prev, ...data.published, })); } }) .catch(() => {}); }, []); return (
{/* Hero Copy */}
{content.badge_text}

{content.headline.includes('ride is doing.') ? ( <> {content.headline.replace('ride is doing.', '')}
ride is doing. ) : ( {content.headline} )}

{content.subheadline}

{content.cta_text || 'Create your account'} arrow_forward play_circle Explore features View Live Demo
{/* Trust Avatars & Proof */}
sports_motorsports
speed
timeline
+420
Trusted by 14,800+ riders Across 420+ racing clubs & track leagues worldwide
{/* Hero Cockpit Showcase Visual */}
Motorcycle leaning into high speed curve with glowing cyan digital telemetry cockpit overlay
{/* Top Badge: Apex Vector Locked */}
Apex Vector Locked | CAN-Bus 100Hz
{/* Floating HUD 1: Lean Angle */}
Lean Angle Live
54° Left
0° Peak 58°
{/* Floating HUD 2: Velocity & G-Force */}
Velocity & G-Force speed
158 MPH
Lateral +1.82 G
{/* Bottom Right Floating HUD 3: GPS Multi-band */}
satellite_alt GPS Multi-Band
10Hz Lock
Sync Latency 12ms
Sat in View 24 Sats
); }