diff --git a/browser/components/NoteItem.js b/browser/components/NoteItem.js index 77e09eed..92aefad6 100644 --- a/browser/components/NoteItem.js +++ b/browser/components/NoteItem.js @@ -39,18 +39,16 @@ const TagElementList = (tags) => { * @param {boolean} isActive * @param {Object} note * @param {Function} handleNoteClick - * @param {Function} handleNoteContextMenu * @param {Function} handleDragStart * @param {string} dateDisplay */ -const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleNoteContextMenu, handleDragStart }) => ( +const NoteItem = ({ isActive, note, dateDisplay, handleNoteClick, handleDragStart }) => (
handleNoteClick(e, `${note.storage}-${note.key}`)} - onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)} onDragStart={e => handleDragStart(e, note)} draggable='true' > @@ -94,7 +92,6 @@ NoteItem.propTypes = { isStarred: PropTypes.bool.isRequired }), handleNoteClick: PropTypes.func.isRequired, - handleNoteContextMenu: PropTypes.func.isRequired, handleDragStart: PropTypes.func.isRequired, handleDragEnd: PropTypes.func.isRequired } diff --git a/browser/components/NoteItemSimple.js b/browser/components/NoteItemSimple.js index 2054f074..42cbe51a 100644 --- a/browser/components/NoteItemSimple.js +++ b/browser/components/NoteItemSimple.js @@ -10,17 +10,15 @@ import styles from './NoteItemSimple.styl' * @param {boolean} isActive * @param {Object} note * @param {Function} handleNoteClick - * @param {Function} handleNoteContextMenu * @param {Function} handleDragStart */ -const NoteItemSimple = ({ isActive, note, handleNoteClick, handleNoteContextMenum, handleDragStart }) => ( +const NoteItemSimple = ({ isActive, note, handleNoteClick, handleDragStart }) => (
handleNoteClick(e, `${note.storage}-${note.key}`)} - onContextMenu={e => handleNoteContextMenu(e, `${note.storage}-${note.key}`)} onDragStart={e => handleDragStart(e, note)} draggable='true' > @@ -46,7 +44,6 @@ NoteItemSimple.propTypes = { title: PropTypes.string.isrequired }), handleNoteClick: PropTypes.func.isRequired, - handleNoteContextMenu: PropTypes.func.isRequired, handleDragStart: PropTypes.func.isRequired } diff --git a/browser/finder/NoteList.js b/browser/finder/NoteList.js index 03ad786d..b82c3226 100644 --- a/browser/finder/NoteList.js +++ b/browser/finder/NoteList.js @@ -70,7 +70,6 @@ class NoteList extends React.Component { dateDisplay={dateDisplay} key={key} handleNoteClick={(e) => this.props.handleNoteClick(e, _index)} - handleNoteContextMenu={() => ''} /> ) }) diff --git a/browser/main/Detail/SnippetNoteDetail.js b/browser/main/Detail/SnippetNoteDetail.js index 7c8170ff..ea3d6038 100644 --- a/browser/main/Detail/SnippetNoteDetail.js +++ b/browser/main/Detail/SnippetNoteDetail.js @@ -166,7 +166,7 @@ class SnippetNoteDetail extends React.Component { } - handleDeleteButtonClick (e) { + handleTrashButtonClick (e) { let index = dialog.showMessageBox(remote.getCurrentWindow(), { type: 'warning', message: 'Delete a note', @@ -520,7 +520,7 @@ class SnippetNoteDetail extends React.Component {
this.handleDeleteButtonClick(e)} + onClick={(e) => this.handleTrashButtonClick(e)} />