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 ; - } - return (
- {children} + {!session && getEnv("SitePassword") ? : children}
diff --git a/components/SignIn.tsx b/components/SignIn.tsx index 272c47c..1bcca2d 100644 --- a/components/SignIn.tsx +++ b/components/SignIn.tsx @@ -1,13 +1,11 @@ "use client"; -import Footer from "@/app/[locale]/(main)/footer"; -import Header from "@/app/[locale]/(main)/header"; import { getCsrfToken } from "next-auth/react"; import { useTranslations } from "next-intl"; import { useSearchParams } from "next/navigation"; import { useEffect, useState } from "react"; -export function SignIn({}) { +export function SignIn() { const t = useTranslations("SignIn"); const [csrfToken, setCsrfToken] = useState(""); @@ -31,36 +29,30 @@ export function SignIn({}) { }, []); return ( -
-
-
-
- -
- - -
-
-
-
-
+
+ +
+ + +
+
); }