import { createClient } from "@/lib/supabase-server" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { UserForm } from "@/components/dashboard/user-form" import { notFound } from "next/navigation" import { getProfile } from "@/lib/data" export default async function ProfilePage() { const supabase = createClient() const { data: { user } } = await supabase.auth.getUser() if (!user) { // Should be protected by middleware but just in case return
Lütfen giriş yapın.
} // Fetch profile data const profile = await getProfile(user.id) if (!profile) { // Fallback for user without profile row? // Or create one on the fly? return
Profil verisi bulunamadı.
} const parts = (profile.full_name || "").split(' ') const firstName = parts[0] || "" const lastName = parts.slice(1).join(' ') || "" const initialData = { firstName, lastName, phone: profile.phone || "", email: user.email || "", role: profile.role || "user" } return (

Profil

Genel Bilgiler Kişisel profil bilgilerinizi buradan güncelleyebilirsiniz.
PK
) }