change unwrap or default to unwrap or false for readability
This commit is contained in:
parent
b25cb4549c
commit
fcd987d433
@ -43,7 +43,7 @@ pub fn Profile() -> impl IntoView {
|
|||||||
<h1>Not Logged In</h1>
|
<h1>Not Logged In</h1>
|
||||||
}>
|
}>
|
||||||
<Show
|
<Show
|
||||||
when=move || user.get().map(|user| user.is_some()).unwrap_or_default()
|
when=move || user.get().map(|user| user.is_some()).unwrap_or(false)
|
||||||
fallback=|| view!{
|
fallback=|| view!{
|
||||||
<h1>Not Logged In</h1>
|
<h1>Not Logged In</h1>
|
||||||
}>
|
}>
|
||||||
@ -54,7 +54,7 @@ pub fn Profile() -> impl IntoView {
|
|||||||
<div class="profile-icon" on:click=open_dropdown>
|
<div class="profile-icon" on:click=open_dropdown>
|
||||||
<Suspense fallback=|| view! { <Icon icon=icondata::CgProfile width="45" height="45"/> }>
|
<Suspense fallback=|| view! { <Icon icon=icondata::CgProfile width="45" height="45"/> }>
|
||||||
<Show
|
<Show
|
||||||
when=move || user.get().map(|user| user.is_some()).unwrap_or_default()
|
when=move || user.get().map(|user| user.is_some()).unwrap_or(false)
|
||||||
fallback=|| view! { <Icon icon=icondata::CgProfile width="45" height="45"/> }
|
fallback=|| view! { <Icon icon=icondata::CgProfile width="45" height="45"/> }
|
||||||
>
|
>
|
||||||
<object class="profile-image" data={user_profile_picture} type="image/webp">
|
<object class="profile-image" data={user_profile_picture} type="image/webp">
|
||||||
@ -69,7 +69,7 @@ pub fn Profile() -> impl IntoView {
|
|||||||
<DropDownNotLoggedIn />
|
<DropDownNotLoggedIn />
|
||||||
}>
|
}>
|
||||||
<Show
|
<Show
|
||||||
when=move || user.get().map(|user| user.is_some()).unwrap_or_default()
|
when=move || user.get().map(|user| user.is_some()).unwrap_or(false)
|
||||||
fallback=|| view!{
|
fallback=|| view!{
|
||||||
<DropDownNotLoggedIn />
|
<DropDownNotLoggedIn />
|
||||||
}>
|
}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user