feat : add codition for stats build
This commit is contained in:
@@ -10,7 +10,7 @@ export default async function AdminLoginPage() {
|
||||
if (await getAdminSession()) redirect("/admin");
|
||||
|
||||
const turnstileSiteKey = process.env.TURNSTILE_SITE_KEY;
|
||||
if (!turnstileSiteKey) {
|
||||
if (process.env.NODE_ENV !== "development" && !turnstileSiteKey) {
|
||||
throw new Error("TURNSTILE_SITE_KEY is required for administrator login.");
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ export default async function AdminLoginPage() {
|
||||
<div className="min-h-svh">
|
||||
<SiteHeader />
|
||||
<main className="grid min-h-[calc(100svh-4rem)] place-items-center px-4 py-12">
|
||||
<LoginCard turnstileSiteKey={turnstileSiteKey} />
|
||||
<LoginCard turnstileSiteKey={turnstileSiteKey ?? ""} />
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user