forked from RustLangES/RustLangES.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.rs
30 lines (27 loc) · 787 Bytes
/
app.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use leptos::*;
use leptos_meta::*;
use leptos_router::*;
use crate::{
components::{Footer, Header},
pages::{Communidad, Contributors, Index},
};
#[component]
pub fn App() -> impl IntoView {
provide_meta_context();
view! {
<Router>
<section class="w-full flex flex-col">
<Header/>
<main>
<Routes>
<Route path="/" view=|| view! { <Index/> }/>
<Route path="/colaboradores" view=|| view! { <Contributors/> }/>
<Route path="/comunidad" view=|| view! { <Communidad/> }/>
</Routes>
<Outlet/>
</main>
<Footer/>
</section>
</Router>
}
}