Leptos updated to 0.5
This commit is contained in:
@@ -3,24 +3,23 @@ use leptos::*;
|
||||
|
||||
#[component]
|
||||
pub fn ServerErr(
|
||||
cx: Scope,
|
||||
result: RwSignal<Option<Result<(), ServerFnError>>>,
|
||||
opener: DialogOpener,
|
||||
) -> impl IntoView {
|
||||
view! {cx, {move || {
|
||||
view! {{move || {
|
||||
if let Some(val) = result.get() {
|
||||
if let Err(e) = val {
|
||||
view! {cx,
|
||||
view! {
|
||||
<div class="alert alert-danger">
|
||||
"Server error: " {e.to_string()}
|
||||
</div>
|
||||
}
|
||||
} else {
|
||||
opener.hide();
|
||||
view! {cx, <div></div>}
|
||||
view! {<div></div>}
|
||||
}
|
||||
} else {
|
||||
view! {cx, <div></div>}
|
||||
view! {<div></div>}
|
||||
}
|
||||
}}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user