feat: implement client portal project view with revision request functionality and layout structure
This commit is contained in:
@@ -14,11 +14,16 @@ export default async function DashboardLayout({
|
||||
const { data: profile } = user
|
||||
? await supabase
|
||||
.from("profiles")
|
||||
.select("first_name, last_name, avatar_url")
|
||||
.select("first_name, last_name, avatar_url, role")
|
||||
.eq("id", user.id)
|
||||
.maybeSingle()
|
||||
: { data: null };
|
||||
|
||||
if (profile?.role === "client") {
|
||||
const { redirect } = await import("next/navigation");
|
||||
redirect("/portal");
|
||||
}
|
||||
|
||||
const fallbackName = user?.email?.split("@")[0] ?? "Cognis Kullanıcısı";
|
||||
const displayName =
|
||||
[profile?.first_name, profile?.last_name].filter(Boolean).join(" ") ||
|
||||
|
||||
Reference in New Issue
Block a user