Dev Helpers
← Back

Attendance mode instructions

Place this file at app/register/page.tsx in an App Router project.

Open this example in the interactive library

Source code

// app/register/page.tsx

import Link from "next/link";

export default async function AttendanceModeInstructions({
  searchParams,
}: {
  searchParams: Promise<Record<string, string | string[] | undefined>>;
}) {
  const { mode } = await searchParams;
  return (
    <main>
      <h1>{mode === "remote" ? "Joining online" : "Venue arrival"}</h1>
      {mode === "remote" ? (
        <Link href="/stream">Open stream lobby</Link>
      ) : (
        <Link href="/venue">See directions</Link>
      )}
    </main>
  );
}