Skip to content

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

fix: rename confirm dialog click handler/ favorites (#16)

Waqar Ahmed8617e50c67f7
diff --git a/apps/web/src/components/dialogs/index.js b/apps/web/src/components/dialogs/index.js
index 64c2c0c44..0332ab742 100644
--- a/apps/web/src/components/dialogs/index.js
+++ b/apps/web/src/components/dialogs/index.js
@@ -221,7 +221,7 @@ const ConfirmationDialog = props => (
text: "Yes",
click: props.onYes
}}
- negativeButton={{ text: "No", click: props.onNo }}
+ negativeButton={{ text: "No", onClick: props.onNo }}
/>
);
diff --git a/apps/web/src/views/Favorites.js b/apps/web/src/views/Favorites.js
index 3adea2c24..d5422dadd 100644
--- a/apps/web/src/views/Favorites.js
+++ b/apps/web/src/views/Favorites.js
@@ -15,7 +15,7 @@ const menuItems = item => [
"Are you sure you want to remove this item from favorites?"
).then(res => {
if (res) {
- (item.type === "notes"
+ (item.type === "note"
? db.notes.note(item.id)
: db.notebooks.notebook(item.id)
)
@@ -40,7 +40,7 @@ const menuItems = item => [
).then(res => {
if (res) {
let itemType = item.type[0] + item.type.substring(1);
- (itemType === "notes" ? db.notes : db.notebooks)
+ (itemType === "note" ? db.notes : db.notebooks)
.delete(item.id)
.then(() => {
showSnack(itemType + " Deleted!", Icon.Trash);