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