Added Auth Context

implement login client code (todo: server login)
Added aboa icon
This commit is contained in:
2025-05-03 23:52:51 -04:00
parent e223612a08
commit d0cc8be566
21 changed files with 135 additions and 48 deletions

View File

@@ -1,11 +1,17 @@
use dioxus::prelude::*;
use crate::{components::Navbar, Route};
use crate::{components::Navbar, contexts::AuthContext, layouts::BasicLayout, views::Login, Route};
#[component]
pub fn MainLayout() -> Element {
rsx! {
let auth_context = use_context::<AuthContext>();
// if auth_context.jwt.cloned().is_none() {
// return rsx! { Login { } };
// }
return rsx! {
Navbar {}
Outlet::<Route> {}
}
};
}