"use client"; import { useCallback, useEffect, useState } from "react"; import { isChinaUser } from "is-china-user"; import { useLocale } from "~/components/locale-provider"; import styles from "./social-follow.module.css"; const DISMISS_KEY = "nomadro-social-dismiss"; const DISMISS_MS = 1000 * 60 * 60 * 24 * 7; // 7 days const SHOW_DELAY_MS = 4500; const X_URL = "https://x.com/nomadro"; /** Public WeChat OA QR — replace asset when brand QR updates */ export const WECHAT_OA_QR = "/wechat-oa-qr.png"; type Mode = "x" | "wechat"; function shouldShow(): boolean { try { const raw = localStorage.getItem(DISMISS_KEY); if (!raw) return true; const ts = Number(raw); if (!Number.isFinite(ts)) return true; return Date.now() - ts > DISMISS_MS; } catch { return true; } } /** 受控:加群 / 关注公众号二维码弹窗 */ export function WechatOaModal({ open, onClose, }: { open: boolean; onClose: () => void; }) { if (!open) return null; return (
保持连接
获取出海导航、游民社群与会员更新,扫码即达。
请搜索公众号「nomadro」
{isZh ? "保持连接" : "Stay in the loop"}
{isZh ? "获取出海导航、游民社群与会员更新,扫码即达。" : "Nomad nav, community drops, and VIP updates — one follow away."}
{isZh ? (请搜索公众号「nomadro」