From b9bda67bc2cb1cdc8dcc0a97edf05338ed21e334 Mon Sep 17 00:00:00 2001 From: dekzter Date: Wed, 25 Feb 2026 12:52:14 -0500 Subject: [PATCH] indicate on reload if login was already complete and data is loading --- frontend/src/components/forms/LoginForm.jsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/forms/LoginForm.jsx b/frontend/src/components/forms/LoginForm.jsx index d190cba2..2c1f02db 100644 --- a/frontend/src/components/forms/LoginForm.jsx +++ b/frontend/src/components/forms/LoginForm.jsx @@ -26,6 +26,7 @@ const LoginForm = () => { const logout = useAuthStore((s) => s.logout); const isAuthenticated = useAuthStore((s) => s.isAuthenticated); const initData = useAuthStore((s) => s.initData); + const user = useAuthStore((s) => s.user); const fetchVersion = useSettingsStore((s) => s.fetchVersion); const storedVersion = useSettingsStore((s) => s.version); @@ -87,10 +88,15 @@ const LoginForm = () => { }, []); useEffect(() => { + // If user is loaded, set isLoading to true so the UI indicates login is complete and is loading data + if (user) { + setIsLoading(true); + } + if (isAuthenticated) { navigate('/channels'); } - }, [isAuthenticated, navigate]); + }, [isAuthenticated, user, navigate]); const handleInputChange = (e) => { setFormData({