mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-29 05: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::{
|
use crate::{
|
||||||
common::SiteView,
|
common::SiteView,
|
||||||
frontend::{
|
frontend::{
|
||||||
api::CLIENT,
|
api::CLIENT,
|
||||||
components::nav::Nav,
|
components::{nav::Nav, protected_route::IbisProtectedRoute},
|
||||||
dark_mode::DarkMode,
|
dark_mode::DarkMode,
|
||||||
pages::{
|
pages::{
|
||||||
article::{
|
article::{
|
||||||
actions::ArticleActions, create::CreateArticle, edit::EditArticle,
|
actions::ArticleActions,
|
||||||
history::ArticleHistory, list::ListArticles, read::ReadArticle,
|
create::CreateArticle,
|
||||||
|
edit::EditArticle,
|
||||||
|
history::ArticleHistory,
|
||||||
|
list::ListArticles,
|
||||||
|
read::ReadArticle,
|
||||||
},
|
},
|
||||||
diff::EditDiff,
|
diff::EditDiff,
|
||||||
instance::{details::InstanceDetails, list::ListInstances},
|
instance::{details::InstanceDetails, list::ListInstances},
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
|
use crate::frontend::app::is_logged_in;
|
||||||
use leptos::prelude::*;
|
use leptos::prelude::*;
|
||||||
use leptos_router::{
|
use leptos_router::{
|
||||||
components::{ProtectedRoute, ProtectedRouteProps},
|
components::{ProtectedRoute, ProtectedRouteProps},
|
||||||
NestedRoute, SsrMode,
|
NestedRoute,
|
||||||
|
SsrMode,
|
||||||
};
|
};
|
||||||
use crate::frontend::app::is_logged_in;
|
|
||||||
|
|
||||||
#[component(transparent)]
|
#[component(transparent)]
|
||||||
pub fn IbisProtectedRoute<Segments, ViewFn, View>(
|
pub fn IbisProtectedRoute<Segments, ViewFn, View>(
|
||||||
|
|
Loading…
Reference in a new issue