"use client"; import { useState } from "react"; import Link from "next/link"; import { ArrowUpRight, Coffee, Compass, Heart, Users } from "lucide-react"; import { socialPath } from "@social/lib/socialPath"; import { useSocialI18n } from "@social/lib/useSocialI18n"; import { useSocialConfig } from "./SocialExperience"; export default function HomeActionRail() { const { tx } = useSocialI18n(); const config = useSocialConfig(); const [intent, setIntent] = useState("people"); const copy = config.copy.socialPages?.discovery; if (config.copy.socialHiddenSections?.includes("discovery")) return null; const journeys = [ { id: "people", icon: Users, label: tx("认识朋友", "Meet people"), title: tx("先找到同频,再聊得投机。", "Find your people. Let conversation follow."), description: tx("从兴趣、城市和一段自我介绍开始,慢慢认识值得连接的人。", "Start with shared interests, a city, and a little introduction. Connect at your own pace."), href: "/people", cta: tx("看看大家", "Meet the community"), secondary: "/date", secondaryLabel: tx("一张一张认识", "Discover one at a time"), step: tx("发现 → 关注 → 了解彼此", "Discover → Follow → Get to know each other") }, { id: "coffee", icon: Coffee, label: tx("约杯咖啡", "Coffee & conversation"), title: tx("留一点时间,认真聊一聊。", "Make time for a real conversation."), description: tx("浏览咖啡聊主理人的介绍与可预约时间,找到适合自己的话题。", "Explore hosts and available times. Find a conversation that feels right for you."), href: "/coffeechat", cta: tx("探索咖啡聊", "Explore coffee chats"), secondary: "/meetup", secondaryLabel: tx("先参加群聊", "Explore group meetups"), step: tx("选话题 → 看时间 → 预约见面", "Find a topic → Pick a time → Book a chat") }, { id: "city", icon: Compass, label: tx("探索同城", "Explore a city"), title: tx("陌生的城市,也有熟悉的同频。", "A new city. A familiar sense of connection."), description: tx("挑一座城市,了解当地生活,再找适合工作、见面的咖啡馆。", "Choose a city, discover local life, and find a cafe for work or a friendly hello."), href: "/places", cta: tx("逛逛城市", "Explore cities"), secondary: "/places?tab=cafes", secondaryLabel: tx("找一家咖啡馆", "Find a cafe"), step: tx("选城市 → 看地点 → 安排见面", "Choose a city → Find a place → Make a plan") }, { id: "create", icon: Heart, label: tx("一起创造", "Build together"), title: tx("把共同兴趣,变成一起做的事。", "Turn shared interests into something real."), description: tx("从小册、视频共创到远程协作,找到可以一起行动的人和事。", "From co-creating guides and videos to remote collaboration, discover people and projects to build with."), href: "/ebook", cta: tx("逛共创", "Browse co-create"), secondary: "/work", secondaryLabel: tx("远程协作", "Remote collaboration"), step: tx("逛共创 → 表达兴趣 → 一起行动", "Browse co-create → Express interest → Build together") }, ]; const selected = journeys.find(journey => journey.id === intent) || journeys[0]; const selectedCopy = config.copy.socialPages?.[`discovery-${selected.id}`]; const Icon = selected.icon; return (
{copy?.eyebrow || tx("你的社区,你的节奏", "YOUR COMMUNITY. YOUR PACE.")}

{copy?.title || tx("今天,想从哪里开始?", "Where would you like to start?")}

{journeys.map(journey => { const Mark = journey.icon; return ; })}

{selectedCopy?.eyebrow || selected.step}

{selectedCopy?.title || selected.title}

{selectedCopy?.description || selected.description}

{selected.cta}{selected.secondaryLabel}
); }