import { createClient } from '@/lib/supabase/server' import { Database } from '@/types/supabase' import { cookies } from 'next/headers' import EmptyState from './EmptyState' import Thread from './Thread' export type ThreadType = Database['public']['Views']['profile_threads']['Row'] async function Threads() { const supabase = createClient() const { data: { user }, } = await supabase.auth.getUser() if (!user) return
Error fetching user details
const { data } = await supabase .from('profile_threads') .select() .eq('user_id', user.id) .order('created_at', { ascending: false }) const threads = data ?? [] return (