1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-12-04 19:11:09 +00:00

Revert "replace <Transition> with <Suspense> to fix crash"

This reverts commit 4e77e65362.
This commit is contained in:
Felix Ableitner 2024-12-03 10:46:13 +01:00
parent c1df872cec
commit f09047a500
2 changed files with 7 additions and 6 deletions

View file

@ -35,7 +35,8 @@ 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| {

View file

@ -50,7 +50,7 @@ pub fn Nav() -> impl IntoView {
<li> <li>
<A href="/articles">"Articles"</A> <A href="/articles">"Articles"</A>
</li> </li>
<Suspense> <Transition>
<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">
<Suspense>{move || notification_count.get()}</Suspense> {move || notification_count.get()}
</span> </span>
</A> </A>
</li> </li>
</Show> </Show>
</Suspense> </Transition>
<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>
<Suspense> <Transition>
<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>
</Suspense> </Transition>
<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">