Files
hackerspace.sh/app/(app)/contacts/page.tsx
T
2026-03-11 04:44:48 +00:00

18 lines
630 B
TypeScript

import { createClient } from '@/lib/supabase/server'
import { ContactsClient } from './contacts-client'
export default async function ContactsPage() {
const supabase = await createClient()
const { data: { user } } = await supabase.auth.getUser()
if (!user) return null
const { data: member } = await supabase
.from('space_members').select('space_id').eq('user_id', user.id).eq('status', 'current').single()
if (!member) return null
const { data: contacts } = await supabase
.from('contacts').select('*').eq('space_id', member.space_id).order('name')
return <ContactsClient contacts={contacts ?? []} />
}