"use client"; import { Link, useTranslation } from "@/i18n/navigation"; import ShopCard from "./ShopCard"; import { TOPIC_IDS } from "@/config"; const linkKeys = ["github", "destinations", "indieDev", "aiAgent", "cloudPhone", "unmannedLive", "appDownload"] as const; const linkIcons: Record<(typeof linkKeys)[number], string> = { github: "📦", destinations: "🗺️", indieDev: "🛠️", aiAgent: "🤖", cloudPhone: "☁️", unmannedLive: "📺", appDownload: "📱", }; const linkHrefs: Record<(typeof linkKeys)[number], { href: string; newTab?: boolean }> = { github: { href: "https://github.com" }, destinations: { href: "https://meetup.hackrobot.cn/", newTab: true }, indieDev: { href: "/ebook" }, aiAgent: { href: "/ebook" }, cloudPhone: { href: "https://android.hackrobot.cn", newTab: true }, unmannedLive: { href: "/ebook" }, appDownload: { href: "/app" }, }; export default function Community() { const { t } = useTranslation("community"); return (
{/* 电商独立站卡片 */}
{/* 数字游民社区 - 优化布局 */}
👥 {t("nomadCommunity")}

{t("joinTitle")}

{t("joinDesc")}

{t("applyForm")} {t("approveJoin")}
📝
{t("applyNow")}
{t("applyHint")}

{t("resourcesTitle")}

{t("contributeSubtitle")}
{t("contributeSubtitle2")}

{linkKeys.map((key) => { const { href, newTab } = linkHrefs[key]; const isTopic = (TOPIC_IDS as readonly string[]).includes(key); const content = ( <> {linkIcons[key]}

{t(`links.${key}.title`)}

{isTopic && ( {t("topicTag")} )}

{t(`links.${key}.desc`)}

{t(`links.${key}.label`)}
); return ( {content} ); })}
); }