---
import UserLayout from "#layouts/DashboardLayout.astro";
import { getCurrentUser } from "#lib/server/user";
import DashboardEinstellungenModule from "#modules/Dashboard/DashboardEinstellungenModule.svelte";
import { validateAccessTokenServer } from "#server/lib/validateAccessToken";

const user = getCurrentUser(Astro)

if (!user) {
	return Astro.redirect("/auth/login", 302);
}

---

<UserLayout title="Einstellungen" {user}>
	<DashboardEinstellungenModule benutzer={user} client:load />
</UserLayout>