From be79a9ba21e9159ffe88485ed2feb1a1f8106f26 Mon Sep 17 00:00:00 2001 From: Mikita Bykau Date: Thu, 12 Dec 2024 11:19:37 +0100 Subject: [PATCH] fix-typo-tg-button (#65) --- src/components/navigation_menu.rs | 44 +++++++++++++++++-------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/components/navigation_menu.rs b/src/components/navigation_menu.rs index 65bb883..5835074 100644 --- a/src/components/navigation_menu.rs +++ b/src/components/navigation_menu.rs @@ -14,30 +14,34 @@ pub fn navigation_menu() -> Html { .author() .map(|a| a.editor == 1) .unwrap_or(false); - + let is_logged_in = !logged_user_context.is_not_inited() && logged_user_context.token() != None; #[cfg(feature = "telegram")] - let tg_button: Option = Some(html! { - - }); + let tg_button: Option = if !is_logged_in { + Some(html! { + + }) + } else { + None + }; #[cfg(not(feature = "telegram"))] let tg_button: Option = None; - + html! { <>