SPB Git forge

spb/rareindex

Public
54commits 1branches 0releases
7.1 MBsize
maindefault branch
10 days agolast push
TypeScript 61.9% HTML 37.2% SQL 0.7%
1.7 KB · 38 lines tsx
Raw Blame History
1import type { Metadata } from 'next';2import Link from 'next/link';3import { redirect } from 'next/navigation';4import { getCurrentUser } from '@/lib/auth/session';5import { safeNext } from '@/lib/auth/pending';6import { SignupForm } from './signup-form';78export const metadata: Metadata = { title: 'Create your account', robots: { index: false } };910const PERKS = ['Track your collection with live RareIndex valuations and cost basis', 'Watchlists, price targets and alerts for the assets you care about', 'Deal Radar: listings priced below fair value in your categories', 'Weekly digest, exports and a shareable collector profile'];1112export default async function SignupPage({ searchParams }: { searchParams: Promise<Record<string, string | string[] | undefined>> }) {13  const sp = await searchParams;14  const next = safeNext(typeof sp.next === 'string' ? sp.next : null, '/collections?welcome=1');15  if (await getCurrentUser()) redirect(next);16  return (17    <>18      <h1 className="text-xl font-semibold tracking-tight">Create your account</h1>19      <p className="mt-1 text-sm text-muted">Free. We will e-mail you a 6-digit code to confirm your address.</p>20      <ul className="mt-4 space-y-1.5 text-xs text-muted">21        {PERKS.map((p) => (22          <li key={p} className="flex gap-2">23            <span className="mt-[7px] h-1 w-1 shrink-0 rounded-full bg-fg" />24            {p}25          </li>26        ))}27      </ul>28      <SignupForm next={next} />29      <p className="mt-6 text-center text-sm text-muted">30        Already have an account?{' '}31        <Link href="/login" className="font-medium text-fg underline-offset-4 hover:underline">32          Sign in33        </Link>34      </p>35    </>36  );37}38