1
0
Fork 0
mirror of https://github.com/Nutomic/ibis.git synced 2024-11-22 17:41:09 +00:00

Fix hiding follow button

This commit is contained in:
Felix Ableitner 2024-11-11 11:59:12 +01:00
parent 1d2bd75faa
commit 1678cbd279

View file

@ -29,12 +29,16 @@ pub fn InstanceFollowButton(instance: DbInstance) -> impl IntoView {
"Follow instance" "Follow instance"
}; };
let class_ = if instance.local {
"hidden"
} else {
"btn btn-sm"
};
view! { view! {
<button <button
class="btn btn-sm" class=class_
on:click=move |_| follow_action.dispatch(instance.id) on:click=move |_| follow_action.dispatch(instance.id)
prop:disabled=move || is_following prop:disabled=move || is_following
prop:hidden=move || instance.local
title="Follow the instance so that new edits are synchronized to your instance." title="Follow the instance so that new edits are synchronized to your instance."
> >
{follow_text} {follow_text}