component structure changes
This commit is contained in:
parent
6d6956592d
commit
73963f5b2e
@ -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/>
|
||||
|
||||
@ -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>
|
||||
}
|
||||
}
|
||||
|
||||
2
src/components/sidebar.rs
Normal file
2
src/components/sidebar.rs
Normal file
@ -0,0 +1,2 @@
|
||||
use crate::prelude::*;
|
||||
use leptos::prelude::*;
|
||||
Loading…
Reference in New Issue
Block a user