component structure changes
This commit is contained in:
parent
6d6956592d
commit
73963f5b2e
@ -5,12 +5,13 @@ use leptos_router::{
|
|||||||
StaticSegment, WildcardSegment,
|
StaticSegment, WildcardSegment,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::components::Dash;
|
use crate::{ prelude::*, components::{ header::Header, Dash } };
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn App() -> impl IntoView {
|
pub fn App() -> impl IntoView {
|
||||||
// Provides context that manages stylesheets, titles, meta tags, etc.
|
// Provides context that manages stylesheets, titles, meta tags, etc.
|
||||||
provide_meta_context();
|
provide_meta_context();
|
||||||
|
provide_context(Store::new(Dashboard::mock()));
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
// injects a stylesheet into the document <head>
|
// injects a stylesheet into the document <head>
|
||||||
@ -22,6 +23,8 @@ pub fn App() -> impl IntoView {
|
|||||||
|
|
||||||
// content for this welcome page
|
// content for this welcome page
|
||||||
<Router>
|
<Router>
|
||||||
|
<Header />
|
||||||
|
<aside></aside>
|
||||||
<main>
|
<main>
|
||||||
<Routes fallback=move || "Not found.">
|
<Routes fallback=move || "Not found.">
|
||||||
<Route path=StaticSegment("") view=Dash/>
|
<Route path=StaticSegment("") view=Dash/>
|
||||||
|
|||||||
@ -3,19 +3,14 @@ use nucleo_matcher::{pattern::{AtomKind, CaseMatching, Pattern, Normalization},
|
|||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
mod header;
|
pub mod header;
|
||||||
|
pub mod sidebar;
|
||||||
|
|
||||||
#[component]
|
#[component]
|
||||||
pub fn Dash () -> impl IntoView {
|
pub fn Dash () -> impl IntoView {
|
||||||
provide_context(Store::new(Dashboard::mock()));
|
|
||||||
|
|
||||||
use header::Header;
|
|
||||||
|
|
||||||
view! {
|
view! {
|
||||||
<div class="wrapper">
|
<div class="wrapper">
|
||||||
<Header />
|
|
||||||
<main></main>
|
|
||||||
</div>
|
</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