Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

refactor: clean note pinning

thecodrr758fdf28eb4f
diff --git a/apps/web/src/components/note/index.js b/apps/web/src/components/note/index.js
index a1e16d177..99217efbe 100644
--- a/apps/web/src/components/note/index.js
+++ b/apps/web/src/components/note/index.js
@@ -21,7 +21,7 @@ const menuItems = (note, index, groupIndex) => [
},
{
title: note.pinned ? "Unpin" : "Pin",
- onClick: () => store.getState().pin(note, index)
+ onClick: () => store.getState().pin(note)
},
{
title: note.favorite ? "Unfavorite" : "Favorite",
diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js
index ac6a10897..5c65e1858 100644
--- a/apps/web/src/stores/note-store.js
+++ b/apps/web/src/stores/note-store.js
@@ -25,7 +25,7 @@ function noteStore(set) {
}
});
},
- pin: async function(note, index) {
+ pin: async function(note) {
await db.notes.note(note).pin();
set(state => {
state.notes = db.notes.group(undefined, true);