From 63392bab7b61977cfd8213427527ae8ec8bea747 Mon Sep 17 00:00:00 2001 From: egecankomur Date: Tue, 5 May 2026 21:06:51 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20getPrefs=20sonucunu=20plain=20object'e?= =?UTF-8?q?=20=C3=A7evir=20(Server=E2=86=92Client=20prop=20hatas=C4=B1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(dashboard)/layout.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/(dashboard)/layout.tsx b/src/app/(dashboard)/layout.tsx index fae4d94..cbb67fc 100644 --- a/src/app/(dashboard)/layout.tsx +++ b/src/app/(dashboard)/layout.tsx @@ -17,7 +17,10 @@ export default async function DashboardLayout({ let themePrefs: ThemePrefs = {}; try { const { account } = await createSessionClient(); - themePrefs = await account.getPrefs(); + const raw = await account.getPrefs(); + // getPrefs returns an Appwrite prototype object — serialize to plain object + // so Next.js can pass it from Server → Client Component + themePrefs = JSON.parse(JSON.stringify(raw)) as ThemePrefs; } catch { // use defaults if prefs unavailable }