fix: getPrefs sonucunu plain object'e çevir (Server→Client prop hatası)
This commit is contained in:
@@ -17,7 +17,9 @@ export default async function DashboardLayout({
|
||||
let themePrefs: ThemePrefs = {};
|
||||
try {
|
||||
const { account } = await createSessionClient();
|
||||
themePrefs = await account.getPrefs<ThemePrefs>();
|
||||
const raw = await account.getPrefs<ThemePrefs>();
|
||||
// getPrefs returns an Appwrite prototype object — must be a plain object for Server→Client prop
|
||||
themePrefs = JSON.parse(JSON.stringify(raw)) as ThemePrefs;
|
||||
} catch {
|
||||
// use defaults if prefs unavailable
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user