JJ Colocate

This commit is contained in:
2025-06-30 14:23:20 -04:00
parent 360fa53439
commit 24abf5607f
77 changed files with 5700 additions and 5700 deletions

View File

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