// ─────────────────────────────────────────────── // Join (Invite) Page (/join/[token]) // ─────────────────────────────────────────────── // Route: /join/:token // Purpose: Server component that validates an // invite token. If the token is a UUID (room // ID), it redirects directly to /call/:token. // Otherwise it queries the DB for an SMS-style // invite and shows a "You're Invited!" landing // page with the caller's phone number. // Layout: Centered card with invite details and // a "Create Account" CTA. // Error states: invalid token, expired token. // ─────────────────────────────────────────────── import { query } from "@/lib/db" import { redirect } from "next/navigation" interface Props { params: Promise<{ token: string }> } /** * ErrorPage * ───────── * Shared inline component for rendering error * states (invalid / expired) with the same * card styling. * * @param message - The error message to display. * @returns A centered error card. */ function ErrorPage({ message }: { message: string }) { return (
Someone wants to connect with you on our platform.
{/* ── Inviter's contact number ── */}Contact Number
{invite.phone}
Create an account to start making free voice calls to this person and others on the platform.
{/* ── Registration CTA ── */} Create Account