diff --git a/app/assets/javascripts/components/NotesOptions.tsx b/app/assets/javascripts/components/NotesOptions.tsx
index 67c5eb17d..6caa20412 100644
--- a/app/assets/javascripts/components/NotesOptions.tsx
+++ b/app/assets/javascripts/components/NotesOptions.tsx
@@ -68,66 +68,68 @@ export const NotesOptions = observer(
- {
- const buttonRect = tagsButtonRef.current.getBoundingClientRect();
- const { offsetTop, offsetWidth } = tagsButtonRef.current;
- setTagsMenuPosition({
- top: offsetTop,
- right:
- buttonRect.right + 265 > document.body.clientWidth
- ? offsetWidth
- : -offsetWidth,
- });
- setTagsMenuOpen(!tagsMenuOpen);
- }}
- >
- {
- if (event.key === 'Escape') {
- setTagsMenuOpen(false);
- }
+ {appState.tags.tagsCount > 0 && (
+ {
+ const buttonRect = tagsButtonRef.current.getBoundingClientRect();
+ const { offsetTop, offsetWidth } = tagsButtonRef.current;
+ setTagsMenuPosition({
+ top: offsetTop,
+ right:
+ buttonRect.right + 265 > document.body.clientWidth
+ ? offsetWidth
+ : -offsetWidth,
+ });
+ setTagsMenuOpen(!tagsMenuOpen);
}}
- onBlur={closeOnBlur}
- ref={tagsButtonRef}
- className={`${buttonClass} justify-between`}
>
-
-
- {'Add tag'}
-
-
-
- {
- if (event.key === 'Escape') {
- setTagsMenuOpen(false);
- tagsButtonRef.current.focus();
- }
- }}
- style={{
- ...tagsMenuPosition,
- }}
- className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px max-h-80 overflow-y-scroll"
- >
- {appState.tags.tags.map((tag) => (
-
- ))}
-
-
+ {
+ if (event.key === 'Escape') {
+ setTagsMenuOpen(false);
+ }
+ }}
+ onBlur={closeOnBlur}
+ ref={tagsButtonRef}
+ className={`${buttonClass} justify-between`}
+ >
+
+
+ {'Add tag'}
+
+
+
+ {
+ if (event.key === 'Escape') {
+ setTagsMenuOpen(false);
+ tagsButtonRef.current.focus();
+ }
+ }}
+ style={{
+ ...tagsMenuPosition,
+ }}
+ className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px max-h-80 overflow-y-scroll"
+ >
+ {appState.tags.tags.map((tag) => (
+
+ ))}
+
+
+ )}