fix(dashboard): a release page of an unknown target says so (#1028) #1071
@@ -284,11 +284,19 @@ pub fn TargetReleasesPage(id: String) -> Element {
|
||||
.and_then(|n| n.as_str())
|
||||
.unwrap_or_default()
|
||||
.to_string(),
|
||||
Some(None) => String::new(),
|
||||
// Not a target of this workspace (or it cannot be read): said as the
|
||||
// target page says it, rather than as releases that fail to load.
|
||||
Some(None) => {
|
||||
return rsx! {
|
||||
div { class: "card target-missing",
|
||||
p { {crate::i18n::texts::targets::NOT_FOUND.get(lang)} }
|
||||
}
|
||||
}
|
||||
}
|
||||
None => return rsx! { div { class: "loading", {tx::LOADING.get(lang)} } },
|
||||
};
|
||||
let listed = match &*releases.read() {
|
||||
Some(Ok(listed)) if !name.is_empty() => listed.clone(),
|
||||
Some(Ok(listed)) => listed.clone(),
|
||||
Some(_) => {
|
||||
return rsx! {
|
||||
ReleaseCrumbs { id: id.clone(), name }
|
||||
|
||||
Reference in new issue
Block a user