{host.name}
{host.bio}
{"intro" in host && typeof host.intro === "string" && ({host.intro}
"use client"; import { useParams, useRouter } from "next/navigation"; import { useEffect } from "react"; import Image from "next/image"; import Link from "next/link"; import Header from "../../components/Header"; import Footer from "../../components/Footer"; import { HOSTS } from "@/config/home.config"; export default function HostDetailPage() { const params = useParams(); const router = useRouter(); const id = typeof params.id === "string" ? params.id : ""; const host = HOSTS.find((h) => h.id === id); useEffect(() => { if (host && "link" in host && host.link) { if (host.link.startsWith("http")) { window.location.href = host.link; } else { router.replace(host.link); } } }, [host, router]); if (!host) { return (
主理人不存在
返回首页跳转中…
{host.bio}
{"intro" in host && typeof host.intro === "string" && ({host.intro}