component structure changes

This commit is contained in:
YK 2025-09-12 00:44:46 +03:00
parent 6d6956592d
commit 73963f5b2e
3 changed files with 8 additions and 8 deletions

View File

@ -5,12 +5,13 @@ use leptos_router::{
StaticSegment, WildcardSegment,
};
use crate::components::Dash;
use crate::{ prelude::*, components::{ header::Header, Dash } };
#[component]
pub fn App() -> impl IntoView {
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context();
provide_context(Store::new(Dashboard::mock()));
view! {
// injects a stylesheet into the document <head>
@ -22,6 +23,8 @@ pub fn App() -> impl IntoView {
// content for this welcome page
<Router>
<Header />
<aside></aside>
<main>
<Routes fallback=move || "Not found.">
<Route path=StaticSegment("") view=Dash/>

View File

@ -3,19 +3,14 @@ use nucleo_matcher::{pattern::{AtomKind, CaseMatching, Pattern, Normalization},
use crate::prelude::*;
mod header;
pub mod header;
pub mod sidebar;
#[component]
pub fn Dash () -> impl IntoView {
provide_context(Store::new(Dashboard::mock()));
use header::Header;
view! {
<div class="wrapper">
<Header />
<main></main>
</div>
}
}

View File

@ -0,0 +1,2 @@
use crate::prelude::*;
use leptos::prelude::*;