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