fix: pin note singular when only one note is selected

This commit is contained in:
Antonella Sgarlatta
2021-05-05 11:52:53 -03:00
parent 63cb7195cb
commit b496cb1cba

View File

@@ -112,7 +112,7 @@ export const NotesOptions = observer(
style={{
...tagsMenuPosition,
}}
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265"
className="sn-dropdown sn-dropdown-anchor-right flex flex-col py-2 max-w-265px"
>
{appState.tags.tags.map((tag) => (
<button
@@ -139,7 +139,13 @@ export const NotesOptions = observer(
type={pinned ? IconType.Unpin : IconType.Pin}
className={iconClass}
/>
{pinned ? 'Unpin notes' : 'Pin notes'}
{appState.notes.selectedNotesCount > 1
? pinned
? 'Unpin notes'
: 'Pin notes'
: pinned
? 'Unpin note'
: 'Pin note'}
</button>
<button
onBlur={closeOnBlur}