From 604791e6c5366898e4200ab49ba96d027c4d8245 Mon Sep 17 00:00:00 2001 From: "DESKTOP-RTLN3BA\\$punk" Date: Wed, 21 May 2025 21:13:56 -0700 Subject: [PATCH] fix: Added Suspense boundary in Login Page --- surfsense_web/app/login/page.tsx | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/surfsense_web/app/login/page.tsx b/surfsense_web/app/login/page.tsx index 95620d2e4..65fa0b873 100644 --- a/surfsense_web/app/login/page.tsx +++ b/surfsense_web/app/login/page.tsx @@ -1,6 +1,6 @@ "use client"; -import { useState, useEffect } from "react"; +import { useState, useEffect, Suspense } from "react"; import { GoogleLoginButton } from "./GoogleLoginButton"; import { LocalLoginForm } from "./LocalLoginForm"; import { Logo } from "@/components/Logo"; @@ -8,7 +8,7 @@ import { AmbientBackground } from "./AmbientBackground"; import { useSearchParams } from "next/navigation"; import { Loader2 } from "lucide-react"; -export default function LoginPage() { +function LoginContent() { const [authType, setAuthType] = useState(null); const [registrationSuccess, setRegistrationSuccess] = useState(false); const [isLoading, setIsLoading] = useState(true); @@ -64,4 +64,26 @@ export default function LoginPage() { ); +} + +// Loading fallback for Suspense +const LoadingFallback = () => ( +
+ +
+ +
+ + Loading... +
+
+
+); + +export default function LoginPage() { + return ( + }> + + + ); } \ No newline at end of file