feat: update release posts
This commit is contained in:
1 parent
1c2e5e2aea
commit
ff81f1c819
6 files changed
+81
-713
No files matched your search
+5
-2
@@ -63,8 +63,11 @@ struct DogApi {
|
||||
#[inline_props]
|
||||
fn Breed(cx: Scope, breed: String) -> Element {
|
||||
let fut = use_future(&cx, (breed,), |(breed,)| async move {
|
||||
let endpoint = format!("https://dog.ceo/api/breed/{}/images/random", breed);
|
||||
reqwest::get(endpoint).await.unwrap().json::<DogApi>().await
|
||||
reqwest::get(format!("https://dog.ceo/api/breed/{}/images/random", breed))
|
||||
.await
|
||||
.unwrap()
|
||||
.json::<DogApi>()
|
||||
.await
|
||||
});
|
||||
|
||||
cx.render(match fut.value() {
|
||||
|
||||
Reference in new issue
Block a user