1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-12-04 08:21: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 {
site().with_default(|site| site.my_profile.is_some())
//site().with_default(|site| site.my_profile.is_some())
false
}
pub fn is_admin() -> bool {
site().with_default(|site| {

View file

@ -50,7 +50,7 @@ pub fn Nav() -> impl IntoView {
<li>
<A href="/articles">"Articles"</A>
</li>
<Suspense>
<Transition>
<Show when=is_logged_in>
<li>
<A href="/create-article">"Create Article"</A>
@ -59,12 +59,12 @@ pub fn Nav() -> impl IntoView {
<A href="/notifications">
"Notifications "
<span class="indicator-item indicator-end badge badge-neutral">
<Suspense>{move || notification_count.get()}</Suspense>
{move || notification_count.get()}
</span>
</A>
</li>
</Show>
</Suspense>
</Transition>
<li>
<form
class="form-control m-0 p-1"
@ -96,7 +96,7 @@ pub fn Nav() -> impl IntoView {
</li>
</ul>
<div class="divider"></div>
<Suspense>
<Transition>
<Show
when=is_logged_in
fallback=move || {
@ -137,7 +137,7 @@ pub fn Nav() -> impl IntoView {
}
</Show>
</Suspense>
</Transition>
<div class="grow min-h-2"></div>
<div class="m-1 grid gap-2">
<label class="flex cursor-pointer gap-2">