nomadro/src/modules/social/components/HomeCoffeeEntry.tsx
Eric 9b7ffb24dc Ship social-first admin console, soft trials, and safer join gates.
Rebuild admin.nomadro.com around community ops, add configurable free peeks instead of nav locks, humanize user copy, and harden UGC/liveness admin APIs with backup/self-test scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-04 23:47:04 +08:00

74 lines
2.2 KiB
TypeScript

"use client";
import Link from "next/link";
import { ArrowUpRight, Coffee } from "lucide-react";
import { socialPath } from "@social/lib/socialPath";
import { socialTx } from "@social/lib/socialTx";
import SectionSpark from "./SectionSpark";
import SocialAvatar from "./SocialAvatar";
const HOST = {
name: "Alice",
city: "清迈 · Chiang Mai",
avatar:
"https://api.dicebear.com/7.x/lorelei/svg?seed=AliceHost&backgroundColor=f59e0b",
};
export default function HomeCoffeeEntry({
/** When true, render on /coffeechat itself (CTA books instead of re-linking). */
inPage = false,
}: {
inPage?: boolean;
}) {
// Nav / entry no longer hard-locks; trial limits apply on booking page.
const href = inPage
? socialPath("/coffeechat/guest")
: socialPath("/coffeechat");
return (
<section
className={`section section-compact${inPage ? " home-coffee-on-page" : ""}`}
id={inPage ? undefined : "coffeechat"}
aria-label={socialTx("咖啡聊")}
>
<div className="container">
<div className="section-header reveal">
<SectionSpark label="coffee" />
<span className="section-tag">
<span>{socialTx("咖啡聊")}</span>
<span>{socialTx("约一杯见面")}</span>
</span>
<h2>
<span className="social-title-emoji" aria-hidden>
☕
</span>
{socialTx("咖啡聊预约")}
</h2>
<p>
{socialTx(
"不想自己硬约?先和主持人喝杯咖啡,轻松认识同城游民。",
)}
</p>
</div>
<Link href={href} className="home-coffee-card reveal">
<SocialAvatar src={HOST.avatar} size={64} />
<div className="home-coffee-copy">
<em>{socialTx("主持人")}</em>
<strong>
{HOST.name} · {HOST.city}
</strong>
<p>
{socialTx("数字游民主持人 · 咖啡馆轻聊,帮你破冰同城")}
</p>
</div>
<span className="btn btn-primary btn-sm">
<Coffee size={14} /> {socialTx("去预约")}
<ArrowUpRight size={14} />
</span>
</Link>
</div>
</section>
);
}