From 6d216265210cc4e4417cca10b97252bfce7540dc Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Mon, 2 Jan 2023 18:06:10 -0600 Subject: [PATCH] Load State after logging in --- web/src/pages/login.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/pages/login.rs b/web/src/pages/login.rs index 90ec765..614191f 100644 --- a/web/src/pages/login.rs +++ b/web/src/pages/login.rs @@ -34,9 +34,10 @@ pub fn LoginForm<'ctx, G: Html>(cx: Scope<'ctx>, sh: StateHandler<'ctx>) -> View spawn_local_scoped(cx, async move { let store = crate::api::HttpStore::get_from_context(cx); debug!("authenticating against ui"); - // TODO(jwall): Navigate to plan if the below is successful. if let Some(user_data) = store.authenticate(username, password).await { sh.dispatch(cx, Message::SetUserData(user_data)); + sh.dispatch(cx, Message::LoadState); + sycamore_router::navigate("/ui/planning/plan"); } }); }