Login Implementation
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
use dioxus::prelude::*;
|
||||
|
||||
use crate::{components::Navbar, contexts::AuthContext, layouts::BasicLayout, views::Login, Route};
|
||||
use crate::{components::Navbar, contexts::AuthContext, views::Login, Route};
|
||||
|
||||
#[component]
|
||||
pub fn MainLayout() -> Element {
|
||||
let auth_context = use_context::<AuthContext>();
|
||||
|
||||
// if auth_context.jwt.cloned().is_none() {
|
||||
// return rsx! { Login { } };
|
||||
// }
|
||||
if auth_context.jwt.cloned().is_none() {
|
||||
return rsx! { Login { } };
|
||||
}
|
||||
|
||||
return rsx! {
|
||||
Navbar {}
|
||||
|
||||
Reference in New Issue
Block a user