Adjust example

This commit is contained in:
Jonathan Kelley committed 2024-01-15 22:14:58 -08:00
1 parent d88561f973
commit f1596bf5e8
1 file changed
+10 -11
+10 -11
View File
@@ -29,17 +29,16 @@ fn app() -> Element {
}
});
match breed_list.value().read().as_ref() {
Some(resp) => rsx! {
h1 { "Select a dog breed!" }
div { height: "500px", display: "flex",
ul { flex: "50%", {breed_list.value().cloned().unwrap_or_else(|| rsx! {
"loading breeds..."
})} }
div { flex: "50%", BreedPic { breed } }
}
},
_ => rsx! { "loading breeds..." },
let Some(breed_list) = breed_list.value().cloned() else {
return rsx! { "loading breeds..." };
};
rsx! {
h1 { "Select a dog breed!" }
div { height: "500px", display: "flex",
ul { flex: "50%", {breed_list} }
div { flex: "50%", BreedPic { breed } }
}
}
}