aboutsummaryrefslogtreecommitdiff
path: root/src/app/settings/page.tsx
blob: 5d5fd92cffd8657e1150bd59a913cc42358dcc71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { redirect } from "next/navigation"
import { getServerSession } from "next-auth"

import Navbar from "@/components/Navbar"
import { authOptions } from "@/lib/auth"
import { SettingsForm } from "@/app/settings/settings-form"

export default async function SettingsPage() {
  const session = await getServerSession(authOptions)

  if (!session?.user) {
    redirect("/login")
  }

  return (
    <div className="min-h-screen bg-background">
      <Navbar />
      <SettingsForm user={session.user} />
    </div>
  )
}