import { redirect } from "next/navigation";
import { getSession } from "@/lib/auth";
export default async function InvitePage({ params }: { params: Promise<{ token: string }> }) { const { token } = await params; const user = await getSession(); if (!user) redirect("/login"); return <section className="card"><h1>加入來源</h1><p>以目前登入帳號 @{user.username} 接受此一次性邀請。</p><form action="/api/invites/accept" method="post"><input type="hidden" name="token" value={token} /><button>接受邀請</button></form></section>; }
