diff --git a/app/(app)/settings/page.tsx b/app/(app)/settings/page.tsx index 0141a3a..3a72c8a 100644 --- a/app/(app)/settings/page.tsx +++ b/app/(app)/settings/page.tsx @@ -1,37 +1,24 @@ /** * @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 { db } from "@/db"; -import { users } from "@/db/schema"; -import { eq } from "drizzle-orm"; import { redirect } from "next/navigation"; import { SettingsView } from "@/components/settings/SettingsView"; import AppFooter from "@/components/layout/AppFooter"; +/** Renders the settings page layout with session validation. */ export default async function SettingsPage() { const session = await auth(); - const currentUserId = session?.user?.id; - if (!currentUserId) { - redirect("/login"); - } - - const [currentUser] = await db - .select() - .from(users) - .where(eq(users.id, currentUserId)) - .limit(1); - - if (!currentUser) { + if (!session?.user?.id) { redirect("/login"); } return (
- +
);