import { verifyInvite } from '@/lib/invite' import FormWrapper from '@/components/forms/FormWrapper' import SignUpForm from '@/components/forms/SignUpForm' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import Link from 'next/link' import { IconArrowLeft } from '@tabler/icons-react' interface Props { searchParams: { token?: string } } export default async function SignupPage({ searchParams }: Props) { const invite = searchParams.token ? await verifyInvite(searchParams.token) : null if (!invite || invite.accepted || new Date(invite.expiresAt) < new Date()) { return (
Invalid or expired invitation.

Reach out to the couple or event planner to get a new invitation link.

Back to Homepage
) } return (
} />
) }