Adjust example
This commit is contained in:
1 file changed
+10
-11
+10
-11
@@ -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..." },
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user