import { Button } from "@/components/ui/button"; import { createClient } from "@/lib/supabase/server"; import Link from "next/link"; interface PageProps { params: Promise<{ id: string }>; } export default async function Page(props: PageProps) { const { id } = await props.params; const supabase = await createClient(); const { data: polls } = await supabase.from("polls").select().eq("id", id); const { data: members } = await supabase .from("poll_members") .select() .order("id", { ascending: true }) .eq("poll_id", id); if (!polls || polls.length === 0) { return
Poll not found
; } const [poll] = polls; return (

{poll.name}

{members?.map((m) => ( ))}
); }