14 lines
327 B
TypeScript
14 lines
327 B
TypeScript
import { cache } from 'react'
|
|
import { createClient } from '@/lib/supabase-server'
|
|
|
|
export const getProfile = cache(async (userId: string) => {
|
|
const supabase = createClient()
|
|
const { data } = await supabase
|
|
.from('profiles')
|
|
.select('*')
|
|
.eq('id', userId)
|
|
.single()
|
|
|
|
return data
|
|
})
|