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() { let Some(breed_list) = breed_list.value().cloned() else {
Some(resp) => rsx! { return rsx! { "loading breeds..." };
h1 { "Select a dog breed!" } };
div { height: "500px", display: "flex",
ul { flex: "50%", {breed_list.value().cloned().unwrap_or_else(|| rsx! { rsx! {
"loading breeds..." h1 { "Select a dog breed!" }
})} } div { height: "500px", display: "flex",
div { flex: "50%", BreedPic { breed } } ul { flex: "50%", {breed_list} }
} div { flex: "50%", BreedPic { breed } }
}, }
_ => rsx! { "loading breeds..." },
} }
} }