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]
|
2023-10-20 23:06:21 +02:00
|
|
|
pub fn App() -> impl IntoView {
|
2023-06-04 12:37:22 +02:00
|
|
|
// Provides context that manages stylesheets, titles, meta tags, etc.
|
2023-10-20 23:06:21 +02:00
|
|
|
provide_meta_context();
|
2023-06-04 12:37:22 +02:00
|
|
|
|
2023-10-20 23:06:21 +02:00
|
|
|
view! {
|
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=""
|
2023-10-20 23:06:21 +02:00
|
|
|
view=|| {
|
|
|
|
view! { <HomePage/> }
|
2023-06-05 12:54:07 +02:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path="/dash"
|
2023-10-20 23:06:21 +02:00
|
|
|
view=|| {
|
|
|
|
view! { <DashboardLayout/> }
|
2023-06-05 12:54:07 +02:00
|
|
|
}
|
|
|
|
>
|
|
|
|
<Route
|
|
|
|
path=""
|
2023-10-20 23:06:21 +02:00
|
|
|
view=|| {
|
|
|
|
view! { <DashHomePage/> }
|
2023-06-05 12:54:07 +02:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
<Route
|
|
|
|
path="home"
|
2023-10-20 23:06:21 +02:00
|
|
|
view=|| {
|
|
|
|
view! { <DashHomePage/> }
|
2023-06-05 12:54:07 +02:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
</Route>
|
|
|
|
<Route
|
|
|
|
path="/features"
|
2023-10-20 23:06:21 +02:00
|
|
|
view=|| {
|
|
|
|
view! { <FeaturesView/> }
|
2023-06-05 12:54:07 +02:00
|
|
|
}
|
|
|
|
/>
|
2023-06-04 12:37:22 +02:00
|
|
|
</Routes>
|
|
|
|
</main>
|
|
|
|
</Router>
|
|
|
|
}
|
|
|
|
}
|