1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-29 03:51:09 +00:00

add protected routes

This commit is contained in:
Felix Ableitner 2024-11-21 14:56:32 +01:00
parent 7f1ecd3e5c
commit 59c0a3bf90
3 changed files with 12 additions and 8 deletions

View file

@ -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},

View file

@ -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>(