diff --git a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js index 6e7c83503..6624e28d1 100644 --- a/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js +++ b/frontend/app/components/Session_/EventsBlock/EventGroupWrapper.js @@ -11,7 +11,7 @@ import { setEditNoteTooltip } from 'Duck/sessions'; // TODO: incapsulate toggler in LocationEvent @withToggle("showLoadInfo", "toggleLoadInfo") -@connect(state => ({members: state.getIn(['members', 'list'])}), { setEditNoteTooltip }) +@connect(state => ({members: state.getIn(['members', 'list']), currentUserId: state.getIn(['account', 'id']) }), { setEditNoteTooltip }) class EventGroupWrapper extends React.Component { toggleLoadInfo = (e) => { @@ -81,6 +81,7 @@ class EventGroupWrapper extends React.Component { noteId={event.noteId} filterOutNote={filterOutNote} onEdit={this.props.setEditNoteTooltip} + noEdit={this.props.currentUserId !== event.userId} /> ) : isLocation ? void; onEdit: (noteTooltipObj: Record) => void; } @@ -69,7 +70,7 @@ function NoteEvent(props: Props) { } }; const menuItems = [ - { icon: 'pencil', text: 'Edit', onClick: onEdit }, + { icon: 'pencil', text: 'Edit', onClick: onEdit, disabled: props.onEdit }, { icon: 'link-45deg', text: 'Copy URL', onClick: onCopy }, { icon: 'trash', text: 'Delete', onClick: onDelete }, ];