From 9ad5c1f2895f800133ad006e017d928f0ee69a9f Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Mon, 21 Oct 2024 10:32:12 +0800
Subject: [PATCH] refactor: auth component
---
app/[locale]/(main)/layout.tsx | 6 +---
components/SignIn.tsx | 60 +++++++++++++++-------------------
2 files changed, 27 insertions(+), 39 deletions(-)
diff --git a/app/[locale]/(main)/layout.tsx b/app/[locale]/(main)/layout.tsx
index e11be35..c237dc7 100644
--- a/app/[locale]/(main)/layout.tsx
+++ b/app/[locale]/(main)/layout.tsx
@@ -11,15 +11,11 @@ type DashboardProps = {
export default async function MainLayout({ children }: DashboardProps) {
const session = await auth();
- if (!session && getEnv("SitePassword")) {
- return