mirror of
https://github.com/Nutomic/ibis.git
synced 2024-11-29 04:41:09 +00:00
replace <Transition> with <Suspense> to fix crash
This commit is contained in:
parent
910c7b5d8f
commit
4e77e65362
2 changed files with 6 additions and 7 deletions
|
@ -35,8 +35,7 @@ pub fn site() -> Resource<SiteView> {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn is_logged_in() -> bool {
|
pub fn is_logged_in() -> bool {
|
||||||
//site().with_default(|site| site.my_profile.is_some())
|
site().with_default(|site| site.my_profile.is_some())
|
||||||
false
|
|
||||||
}
|
}
|
||||||
pub fn is_admin() -> bool {
|
pub fn is_admin() -> bool {
|
||||||
site().with_default(|site| {
|
site().with_default(|site| {
|
||||||
|
|
|
@ -50,7 +50,7 @@ pub fn Nav() -> impl IntoView {
|
||||||
<li>
|
<li>
|
||||||
<A href="/articles">"Articles"</A>
|
<A href="/articles">"Articles"</A>
|
||||||
</li>
|
</li>
|
||||||
<Transition>
|
<Suspense>
|
||||||
<Show when=is_logged_in>
|
<Show when=is_logged_in>
|
||||||
<li>
|
<li>
|
||||||
<A href="/create-article">"Create Article"</A>
|
<A href="/create-article">"Create Article"</A>
|
||||||
|
@ -59,12 +59,12 @@ pub fn Nav() -> impl IntoView {
|
||||||
<A href="/notifications">
|
<A href="/notifications">
|
||||||
"Notifications "
|
"Notifications "
|
||||||
<span class="indicator-item indicator-end badge badge-neutral">
|
<span class="indicator-item indicator-end badge badge-neutral">
|
||||||
{move || notification_count.get()}
|
<Suspense>{move || notification_count.get()}</Suspense>
|
||||||
</span>
|
</span>
|
||||||
</A>
|
</A>
|
||||||
</li>
|
</li>
|
||||||
</Show>
|
</Show>
|
||||||
</Transition>
|
</Suspense>
|
||||||
<li>
|
<li>
|
||||||
<form
|
<form
|
||||||
class="form-control m-0 p-1"
|
class="form-control m-0 p-1"
|
||||||
|
@ -96,7 +96,7 @@ pub fn Nav() -> impl IntoView {
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="divider"></div>
|
<div class="divider"></div>
|
||||||
<Transition>
|
<Suspense>
|
||||||
<Show
|
<Show
|
||||||
when=is_logged_in
|
when=is_logged_in
|
||||||
fallback=move || {
|
fallback=move || {
|
||||||
|
@ -137,7 +137,7 @@ pub fn Nav() -> impl IntoView {
|
||||||
}
|
}
|
||||||
|
|
||||||
</Show>
|
</Show>
|
||||||
</Transition>
|
</Suspense>
|
||||||
<div class="grow min-h-2"></div>
|
<div class="grow min-h-2"></div>
|
||||||
<div class="m-1 grid gap-2">
|
<div class="m-1 grid gap-2">
|
||||||
<label class="flex cursor-pointer gap-2">
|
<label class="flex cursor-pointer gap-2">
|
||||||
|
|
Loading…
Reference in a new issue