mirror of
https://github.com/kristoferssolo/kristofersxyz-rs.git
synced 2025-10-21 20:10:36 +00:00
31 lines
809 B
Rust
31 lines
809 B
Rust
use leptos::prelude::*;
|
|
use leptos_meta::{Stylesheet, Title, provide_meta_context};
|
|
use leptos_router::{
|
|
StaticSegment,
|
|
components::{Route, Router, Routes},
|
|
};
|
|
|
|
use crate::components::home_page::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/start-axum-workspace.css" />
|
|
|
|
// sets the document title
|
|
<Title text="Welcome to Leptos" />
|
|
|
|
// content for this welcome page
|
|
<Router>
|
|
<main>
|
|
<Routes fallback=|| "Page not found.".into_view()>
|
|
<Route path=StaticSegment("") view=HomePage />
|
|
</Routes>
|
|
</main>
|
|
</Router>
|
|
}
|
|
}
|