mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-29 03:41:09 +00:00
add protected routes
This commit is contained in:
parent
7f1ecd3e5c
commit
59c0a3bf90
3 changed files with 12 additions and 8 deletions
|
@ -1,14 +1,17 @@
|
|||
use crate::frontend::components::protected_route::IbisProtectedRoute;
|
||||
use crate::{
|
||||
common::SiteView,
|
||||
frontend::{
|
||||
api::CLIENT,
|
||||
components::nav::Nav,
|
||||
components::{nav::Nav, protected_route::IbisProtectedRoute},
|
||||
dark_mode::DarkMode,
|
||||
pages::{
|
||||
article::{
|
||||
actions::ArticleActions, create::CreateArticle, edit::EditArticle,
|
||||
history::ArticleHistory, list::ListArticles, read::ReadArticle,
|
||||
actions::ArticleActions,
|
||||
create::CreateArticle,
|
||||
edit::EditArticle,
|
||||
history::ArticleHistory,
|
||||
list::ListArticles,
|
||||
read::ReadArticle,
|
||||
},
|
||||
diff::EditDiff,
|
||||
instance::{details::InstanceDetails, list::ListInstances},
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
use crate::frontend::app::is_logged_in;
|
||||
use leptos::prelude::*;
|
||||
use leptos_router::{
|
||||
components::{ProtectedRoute, ProtectedRouteProps},
|
||||
NestedRoute, SsrMode,
|
||||
NestedRoute,
|
||||
SsrMode,
|
||||
};
|
||||
use crate::frontend::app::is_logged_in;
|
||||
|
||||
#[component(transparent)]
|
||||
pub fn IbisProtectedRoute<Segments, ViewFn, View>(
|
||||
|
|
Loading…
Reference in a new issue