Clean up more examples

This commit is contained in:
Jonathan Kelley committed 2024-01-15 14:40:56 -08:00
1 parent bb6aa9e792
commit fe12b1062f
9 files changed
+285 -333

No files matched your search

+2 -2
View File
@@ -36,7 +36,7 @@ fn app() -> Element {
}
}
}
div { flex: "50%", BreedPic { breed: breed.to_string() } }
div { flex: "50%", BreedPic { breed } }
}
}
},
@@ -50,7 +50,7 @@ struct DogApi {
}
#[component]
fn BreedPic(breed: String) -> Element {
fn BreedPic(breed: Signal<String>) -> Element {
let fut = use_future(|breed| async move {
reqwest::get(format!("https://dog.ceo/api/breed/{breed}/images/random"))
.await