All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 2m44s
17 lines
501 B
TypeScript
17 lines
501 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { auth } from "@/auth";
|
|
import { prisma } from "@/lib/db";
|
|
import { SettingsPasswordForm } from "@/components/SettingsPasswordForm";
|
|
|
|
export default async function SettingsPage() {
|
|
const session = await auth();
|
|
if (!session?.user?.id) redirect("/auth/login");
|
|
|
|
const user = await prisma.user.findUnique({
|
|
where: { id: session.user.id },
|
|
select: { name: true },
|
|
});
|
|
|
|
return <SettingsPasswordForm currentName={user?.name ?? ""} />;
|
|
}
|