diff --git a/src/_middleware.ts b/src/_middleware.ts new file mode 100644 index 0000000..5f1e588 --- /dev/null +++ b/src/_middleware.ts @@ -0,0 +1,24 @@ +// import { auth } from "@/auth" +// import type { NextRequest } from "next/server" +// import { NextResponse } from "next/server" + +// export async function middleware(request: NextRequest) { +// const session = await auth() + +// const isProtectedPath = +// !request.nextUrl.pathname.startsWith("/api/auth") && +// !request.nextUrl.pathname.startsWith("/_next") && +// !request.nextUrl.pathname.startsWith("/favicon") && +// !request.nextUrl.pathname.startsWith("/assets") + +// if (isProtectedPath && !session) { +// const signInUrl = new URL("/api/auth/signin", request.url) +// return NextResponse.redirect(signInUrl) +// } + +// return NextResponse.next() +// } + +// export const config = { +// matcher: ["/((?!api/auth|_next/static|_next/image|favicon.ico).*)"], +// } \ No newline at end of file diff --git a/src/components/global/Header.tsx b/src/components/global/Header.tsx index 3e2eaeb..f8c373d 100644 --- a/src/components/global/Header.tsx +++ b/src/components/global/Header.tsx @@ -1,16 +1,16 @@ -import { auth } from "@/auth"; -import { SignInOutButton } from "../auth/SignInOutButton"; +// import { auth } from "@/auth"; +// import { SignInOutButton } from "../auth/SignInOutButton"; import ModeToggle from "./ModeToggle"; import TopNav from "./TopNav"; export default async function Header() { - const session = await auth() + // const session = await auth() return (