Files
AobaV2/AobaClient/src/layouts/main_layout.rs
T
Amatsugu b1ab165665
Build and Push Image / build-and-push (push) Successful in 5m4s
added ability to set media class of items
2026-03-29 03:19:34 -04:00

34 lines
624 B
Rust

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 { }
};
}
// let mut ct_renderer = use_context::<ContextMenuRenderer>();
return rsx! {
// ContextMenuRoot { }
Navbar { }
div {
id: "content",
// onclick: move |_| {
// ct_renderer.close();
// },
// oncontextmenu: move |_| {
// ct_renderer.close();
// },
Outlet::<Route> { }
}
};
}