como-web/src/app.rs
kjuulh a7986e304c
feat: update to newest leptos
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-10-20 23:06:21 +02:00

56 lines
1.6 KiB
Rust

use leptos::*;
use leptos_meta::*;
use leptos_router::*;
use crate::common::layout::DashboardLayout;
use crate::routes::dash::home::DashHomePage;
use crate::routes::features_view::FeaturesView;
use crate::routes::home::HomePage;
#[component]
pub fn App() -> impl IntoView {
// Provides context that manages stylesheets, titles, meta tags, etc.
provide_meta_context();
view! {
<Stylesheet id="leptos" href="/pkg/como_web.css"/>
<Router>
<main>
<Routes>
<Route
path=""
view=|| {
view! { <HomePage/> }
}
/>
<Route
path="/dash"
view=|| {
view! { <DashboardLayout/> }
}
>
<Route
path=""
view=|| {
view! { <DashHomePage/> }
}
/>
<Route
path="home"
view=|| {
view! { <DashHomePage/> }
}
/>
</Route>
<Route
path="/features"
view=|| {
view! { <FeaturesView/> }
}
/>
</Routes>
</main>
</Router>
}
}