Upgraded to Next Auth v5

This commit is contained in:
Tom
2024-01-02 07:26:20 +00:00
parent a3352af981
commit 4505654a05
24 changed files with 283 additions and 227 deletions

View File

@ -7,14 +7,13 @@ const SettingsLayout = async (
{ children } : { children:React.ReactNode } ) => {
const headersList = headers();
const header_url = headersList.get('x-url') || "";
console.log("HEADER URL: " + header_url)
return (
<div className="h-full">
<div className={cn("hidden md:flex h-full w-[250px] z-30 flex-col fixed inset-y-0", header_url.endsWith("/settings") && "md:flex h-full w-full z-30 flex-col fixed inset-y-0")}>
<SettingsNavigation />
</div>
{header_url}
<main className={cn("md:pl-[250px] h-full", header_url.endsWith("/settings") && "hidden")}>
{children}
</main>

View File

@ -1,8 +1,9 @@
"use client";
import { auth } from "@/auth";
const SettingsPage = () => {
const SettingsPage = async () => {
return (
<div>
{JSON.stringify(await auth())}
</div>
);
}