web sitesi yönetimi

This commit is contained in:
2026-01-25 01:46:12 +03:00
parent 6e56b1e75f
commit 0fe49b5c96
15 changed files with 575 additions and 155 deletions

View File

@@ -11,3 +11,21 @@ export const getProfile = cache(async (userId: string) => {
return data
})
export const getSiteContents = cache(async () => {
const supabase = createClient()
const { data } = await supabase
.from('site_contents')
.select('*')
// Convert to a simpler key-value map for easier usage in components
const contentMap: Record<string, string> = {}
if (data) {
data.forEach((item: any) => {
contentMap[item.key] = item.value
})
}
return contentMap
})