Last active
April 19, 2023 04:12
-
-
Save Enigo/5be7e53059c7d424ddaa3481845ae5dc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
#[function_component(Home)] | |
pub fn home_function_component() -> Html { | |
... | |
let collections = collections.iter().map(|collection| html! { | |
<div class="col text-center"> | |
<Link<Route> to={Route::Collection {token_address: collection.address.clone()} } classes="img-fluid"> | |
<img src={collection.collection_image_url.clone()} class="img-fluid" width="250" height="250" alt={collection.name.clone()}/> | |
</Link<Route>> | |
<p class="text-white">{collection.name.clone()}</p> | |
</div> | |
}).collect::<Html>(); | |
return html! { | |
<div class="container mt-4"> | |
<div class="row justify-content-md-center"> | |
{ collections } | |
</div> | |
</div> | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment