From ff43b3f7e84380b0c2ccfa8d03c95a1084e6728c Mon Sep 17 00:00:00 2001 From: Ethan Girouard Date: Sun, 12 May 2024 11:00:47 -0400 Subject: [PATCH] Use nested routing for navigation Remove dashboard_open signal Use tags to navigate to new pages Add dashboard and search to nested routing --- src/app.rs | 26 ++++++++++++-------------- src/components/sidebar.rs | 28 +++++++++++++++------------- style/sidebar.scss | 1 + 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/app.rs b/src/app.rs index 946b4c2..c7b7fe4 100644 --- a/src/app.rs +++ b/src/app.rs @@ -14,6 +14,9 @@ pub fn App() -> impl IntoView { // Provides context that manages stylesheets, titles, meta tags, etc. provide_meta_context(); + let play_status = PlayStatus::default(); + let play_status = create_rw_signal(play_status); + view! { // injects a stylesheet into the document // id=leptos means cargo-leptos will hot-reload this stylesheet @@ -33,7 +36,11 @@ pub fn App() -> impl IntoView { }>
- + }> + + + + @@ -49,21 +56,12 @@ use crate::components::personal::*; /// Renders the home page of your application. #[component] -fn HomePage() -> impl IntoView { - let play_status = PlayStatus::default(); - let play_status = create_rw_signal(play_status); - - let (dashboard_open, set_dashboard_open) = create_signal(true); - +fn HomePage(play_status: RwSignal) -> impl IntoView { view! {