diff --git a/apps/client/src/widgets/FloatingButtons.css b/apps/client/src/widgets/FloatingButtons.css index f034ae925..1bf4ff23f 100644 --- a/apps/client/src/widgets/FloatingButtons.css +++ b/apps/client/src/widgets/FloatingButtons.css @@ -100,6 +100,10 @@ margin-left: 5px !important; } +.close-floating-buttons:first-child { + display: none !important; +} + .close-floating-buttons-button { border: 1px solid transparent; color: var(--button-text-color); @@ -156,4 +160,4 @@ font-weight: bold; background-color: yellow; } -/* #endregion */ \ No newline at end of file +/* #endregion */ diff --git a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx index 28092839b..96caf9b60 100644 --- a/apps/client/src/widgets/FloatingButtonsDefinitions.tsx +++ b/apps/client/src/widgets/FloatingButtonsDefinitions.tsx @@ -331,7 +331,7 @@ function InAppHelpButton({ note }: FloatingButtonContext) { function Backlinks({ note }: FloatingButtonContext) { let [ backlinkCount, setBacklinkCount ] = useState(0); - let [ popupOpen, setPopupOpen ] = useState(true); + let [ popupOpen, setPopupOpen ] = useState(false); const backlinksContainerRef = useRef(null); useEffect(() => { @@ -351,22 +351,20 @@ function Backlinks({ note }: FloatingButtonContext) { } }, [ popupOpen, windowHeight ]); - return ( + return (backlinkCount > 0 &&
- {backlinkCount > 0 && <> -
setPopupOpen(!popupOpen)} - > - {t("zpetne_odkazy.backlink", { count: backlinkCount })} -
+
setPopupOpen(!popupOpen)} + > + {t("zpetne_odkazy.backlink", { count: backlinkCount })} +
- {popupOpen && ( -
- -
- )} - } + {popupOpen && ( +
+ +
+ )}
); }