"use client"; import { useState } from "react"; import { Link, useLocale } from "@/i18n/navigation"; import { useTranslation } from "@/i18n/navigation"; const MEDIA_NAMES_ZH = ["36氪", "少数派", "极客公园", "虎嗅", "创业邦", "澎湃新闻"]; const MEDIA_NAMES_EN = ["36Kr", "sspai", "GeekPark", "Huxiu", "Cyzone", "The Paper"]; const avatarPhotos = [ "https://i.pravatar.cc/150?img=32", "https://i.pravatar.cc/150?img=33", "https://i.pravatar.cc/150?img=25", "https://i.pravatar.cc/150?img=52", "https://i.pravatar.cc/150?img=44", "https://i.pravatar.cc/150?img=55", "https://i.pravatar.cc/150?img=47", "https://i.pravatar.cc/150?img=57", "https://i.pravatar.cc/150?img=48", "https://i.pravatar.cc/150?img=59", "https://i.pravatar.cc/150?img=49", ]; const features = [ { icon: "📍", key: "feature1" as const }, { icon: "📊", key: "feature2" as const }, { icon: "👥", key: "feature3" as const }, { icon: "💰", key: "feature4" as const }, { icon: "📈", key: "feature5" as const }, ]; export default function HeroSection() { const { t } = useTranslation("common"); const { t: tHero } = useTranslation("hero"); const locale = useLocale(); const [email, setEmail] = useState(""); const handleJoin = (e: React.FormEvent) => { e.preventDefault(); if (email.trim()) { alert(locale === "zh" ? `欢迎加入游牧中国!我们将发送确认邮件到 ${email}` : `Welcome! We'll send a confirmation email to ${email}`); } }; return (
{/* Left Column */}
🏆 {tHero("badge")}

{tHero("title")}
{tHero("titleSuffix")}

{tHero("subtitle")}

{features.map((f) => (
{f.icon} {tHero(f.key)}
))}
{avatarPhotos.slice(0, 8).map((src, i) => ( ))}
{tHero("membersJoined")}

{tHero("mediaPress")}

{(locale === "zh" ? MEDIA_NAMES_ZH : MEDIA_NAMES_EN).map( (name) => ( {name} ) )}
{/* Right Column: Video + Email */}
setEmail(e.target.value)} placeholder={tHero("emailPlaceholder")} className="w-full border border-gray-200 dark:border-gray-700 rounded-lg px-4 py-3 text-sm placeholder-gray-400 dark:placeholder-gray-500 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-[#ff4d4f]/20 focus:border-[#ff4d4f] transition-colors mb-3" />

{tHero("loginHint")}

📍 {tHero("quickLinks.nextStop")} 🍹 {tHero("quickLinks.meetups")} ❤️ {tHero("quickLinks.dating")} 📊 {tHero("quickLinks.tools")} 🤖 {tHero("quickLinks.ai")} 💰 {tHero("quickLinks.gigs")} 📊 {tHero("quickLinks.report")} 💬 {tHero("quickLinks.join")}
); }