dagger-components/examples/leptos-build/testdata/crates/hackernews_axum/src/routes/nav.rs
kjuulh 11323c0752
All checks were successful
continuous-integration/drone/push Build is passing
feat: add leptos
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-10-22 12:09:57 +02:00

31 lines
880 B
Rust

use leptos::{component, view, IntoView};
use leptos_router::*;
#[component]
pub fn Nav() -> impl IntoView {
view! {
<header class="header">
<nav class="inner">
<A href="/">
<strong>"HN"</strong>
</A>
<A href="/new">
<strong>"New"</strong>
</A>
<A href="/show">
<strong>"Show"</strong>
</A>
<A href="/ask">
<strong>"Ask"</strong>
</A>
<A href="/job">
<strong>"Jobs"</strong>
</A>
<a class="github" href="http://github.com/leptos-rs/leptos" target="_blank" rel="noreferrer">
"Built with Leptos"
</a>
</nav>
</header>
}
}