import { createClient } from '@/lib/supabase/server' import { getPublicForm } from '@/lib/actions' import { parseFormSchema } from '@/lib/forms-schema' import { PublicFormClient } from './public-form-client' export const dynamic = 'force-dynamic' export default async function PublicFormPage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params const res = await getPublicForm({ slug }) if ('error' in res && res.error) { return ( This form is not available It may be unpublished, closed, or the link is wrong. ) } const form = res.data const supabase = await createClient() const { data: { user }, } = await supabase.auth.getUser() return ( ) }
It may be unpublished, closed, or the link is wrong.