diff --git a/frontend/src/app.rs b/frontend/src/app.rs index 9846e04..d9b9033 100644 --- a/frontend/src/app.rs +++ b/frontend/src/app.rs @@ -15,8 +15,6 @@ pub fn App() -> impl IntoView { let is_loading = signal(true); let is_authenticated = signal(false); - let needs_auth_redirect = signal(false); - let needs_setup_redirect = signal(false); Effect::new(move |_| { spawn_local(async move { @@ -27,9 +25,8 @@ pub fn App() -> impl IntoView { match setup_res { Ok(status) => { if !status.completed { - log::info!("Setup not completed, redirecting to /setup"); - needs_setup_redirect.set(true); - is_loading.set(false); + log::info!("Setup not completed"); + is_loading.1.set(false); return; } } @@ -48,24 +45,22 @@ pub fn App() -> impl IntoView { } } - is_authenticated.set(true); + is_authenticated.1.set(true); } Ok(false) => { log::info!("Not authenticated"); - needs_auth_redirect.set(true); } Err(e) => { log::error!("Auth check failed: {:?}", e); - needs_auth_redirect.set(true); } } - is_loading.set(false); + is_loading.1.set(false); }); }); Effect::new(move |_| { - if is_authenticated.get() { + if is_authenticated.0.get() { spawn_local(async { gloo_timers::future::TimeoutFuture::new(2000).await; @@ -81,7 +76,7 @@ pub fn App() -> impl IntoView { "404 Not Found" }> impl IntoView { } /> impl IntoView { impl IntoView { }); view! { - }> - + @@ -130,15 +125,15 @@ pub fn App() -> impl IntoView { - + +
"Settings Page (Coming Soon)"