Disambiguate expressions in rsx by requiring curlies

This commit is contained in:
Jonathan Kelley committed 2024-01-10 19:33:34 -08:00
1 parent 663296ae45
commit d9b84f9f8f
53 files changed
+399 -373

No files matched your search

@@ -41,7 +41,7 @@ pub fn LogOut(cx: Scope<ClientProps>) -> Element {
}
Err(error) => {
rsx! {
div { format!{"Failed to load disconnection url: {:?}", error} }
div { "Failed to load disconnection url: {error:?}" }
}
}
},
@@ -143,9 +143,9 @@ pub fn LoadClient(cx: Scope) -> Element {
}
}
Err(error) => {
log::info! {"Failed to load client: {:?}", error};
rsx! {
div { format!{"Failed to load client: {:?}", error} }
log::info!{"Failed to load client: {:?}", error},
div { "Failed to load client: {error:?}" }
Outlet::<Route> {}
}
}
@@ -184,7 +184,7 @@ pub fn AuthHeader(cx: Scope) -> Element {
Ok(email) => {
rsx! {
div {
div { email }
div { {email} }
LogOut { client_id: client_props.client_id, client: client_props.client }
Outlet::<Route> {}
}
@@ -207,7 +207,7 @@ pub fn AuthHeader(cx: Scope) -> Element {
log::info!("Other issue with token");
rsx! {
div {
div { error.to_string() }
div { "{error}" }
Outlet::<Route> {}
}
}
@@ -2,6 +2,9 @@ use dioxus::prelude::*;
#[component]
pub fn NotFound(cx: Scope, route: Vec<String>) -> Element {
let routes = route.join("");
render! {rsx! {div{routes}}}
render! {
div{
{route.join("")}
}
}
}