fix(settings): remove unused props from SettingsView call
All checks were successful
Deploy Waveform to VPS / deploy (push) Successful in 1m18s

This commit is contained in:
Chneemann 2026-09-23 10:36:37 +02:00
parent 256c3d03e3
commit db0616aa9a
No known key found for this signature in database

View file

@ -1,37 +1,24 @@
/** /**
* @file app/(app)/settings/page.tsx * @file app/(app)/settings/page.tsx
* @description Settings page for managing user profile, appearance, and account preferences. * @description Server component page for user settings, handling session authentication and rendering SettingsView.
*/ */
import { auth } from "@/auth"; import { auth } from "@/auth";
import { db } from "@/db";
import { users } from "@/db/schema";
import { eq } from "drizzle-orm";
import { redirect } from "next/navigation"; import { redirect } from "next/navigation";
import { SettingsView } from "@/components/settings/SettingsView"; import { SettingsView } from "@/components/settings/SettingsView";
import AppFooter from "@/components/layout/AppFooter"; import AppFooter from "@/components/layout/AppFooter";
/** Renders the settings page layout with session validation. */
export default async function SettingsPage() { export default async function SettingsPage() {
const session = await auth(); const session = await auth();
const currentUserId = session?.user?.id;
if (!currentUserId) { if (!session?.user?.id) {
redirect("/login");
}
const [currentUser] = await db
.select()
.from(users)
.where(eq(users.id, currentUserId))
.limit(1);
if (!currentUser) {
redirect("/login"); redirect("/login");
} }
return ( return (
<div className="flex flex-col h-full w-full bg-background p-4"> <div className="flex flex-col h-full w-full bg-background p-4">
<SettingsView userId={currentUserId} currentUser={currentUser} /> <SettingsView />
<AppFooter /> <AppFooter />
</div> </div>
); );