From 754b72cf878cbefe617b7d4c8af55c064659c9ed Mon Sep 17 00:00:00 2001 From: GameDog9988 Date: Tue, 3 Oct 2023 22:04:54 -0400 Subject: [PATCH] feat: initial account page --- apps/client/src/app/account/page.tsx | 24 +++++++ .../client/src/components/account-content.tsx | 69 +++++++++++++++++++ apps/client/src/components/menu.tsx | 16 ++++- 3 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 apps/client/src/app/account/page.tsx create mode 100644 apps/client/src/components/account-content.tsx diff --git a/apps/client/src/app/account/page.tsx b/apps/client/src/app/account/page.tsx new file mode 100644 index 0000000..2b804f7 --- /dev/null +++ b/apps/client/src/app/account/page.tsx @@ -0,0 +1,24 @@ +import AccountContent from "@ai/components/account-content"; +import Footer from "@ai/components/footer"; +import Header from "@ai/components/header"; +import { authOptions } from "@ai/pages/api/auth/[...nextauth]"; +import { getServerSession } from "next-auth"; +import { redirect } from "next/navigation"; + +export default async function Account() { + const session = await getServerSession(authOptions()); + + if (!session) { + redirect("/"); + } + + return ( + <> +
+
+ +
+