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