Auto-login user after setup and redirect to dashboard
All checks were successful
Build MIPS Binary / build (push) Successful in 4m16s

This commit is contained in:
spinline
2026-02-07 19:54:14 +03:00
parent 643b83ac21
commit 9f009bc18b
2 changed files with 45 additions and 5 deletions

View File

@@ -48,8 +48,9 @@ pub fn Setup() -> impl IntoView {
match client.send().await {
Ok(resp) => {
if resp.ok() {
// Redirect to login after setup (full reload to be safe)
let _ = window().location().set_href("/login");
// Redirect to home after setup (auto-login handled by backend)
// Full reload to ensure auth state is refreshed
let _ = window().location().set_href("/");
} else {
let text = resp.text().await.unwrap_or_default();
set_error.set(Some(format!("Hata: {}", text)));