add real db
This commit is contained in:
22
src/routes/link.rs
Normal file
22
src/routes/link.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use leptos::*;
|
||||
//use leptos_meta::*;
|
||||
use leptos_router::*;
|
||||
|
||||
#[component]
|
||||
pub fn Links() -> impl IntoView {
|
||||
view! {
|
||||
<ul class="flex gap-5 mt-5 justify-center">
|
||||
<Link link="aa".to_string() name="Mon Lien".to_string() />
|
||||
<Link link="aa".to_string() name="mon lien 2".to_string() />
|
||||
</ul>
|
||||
}
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn Link(link: String, name: String) -> impl IntoView {
|
||||
view! {
|
||||
<li>
|
||||
<a class="border border-lime-500 bg-lime-500 hover:bg-lime-400 text-black px-3 py-2 inline-block" href=link>{name}</a>
|
||||
</li>
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user