From d1760f2637592edd1bbe8073d6a07fee86890c8e Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 1 May 2024 16:55:02 +0200 Subject: [PATCH] fix(web): buttons are not reactive until logged in --- web/src/components/object.rs | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/web/src/components/object.rs b/web/src/components/object.rs index 84e7034b..43bf1116 100644 --- a/web/src/components/object.rs +++ b/web/src/components/object.rs @@ -162,9 +162,11 @@ pub fn LikeButton( view! { impl IntoView { let reply = use_context::().expect("missing reply controls context"); + let auth = use_context::().expect("missing auth context"); let comments = if n > 0 { Some(view! { {n} }) } else { @@ -208,8 +211,11 @@ pub fn ReplyButton(n: u64, target: String) -> impl IntoView { view! { {comments} " 📨" @@ -225,9 +231,11 @@ pub fn RepostButton(n: u64, target: String) -> impl IntoView { view! {