File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -110,6 +110,7 @@ export function CommentsListItemContextMenu(props: CommentsListItemContextMenuPr
110
110
icon = { status === 'open' ? CheckmarkCircleIcon : UndoIcon }
111
111
mode = "bleed"
112
112
onClick = { onStatusChange }
113
+ hidden = { ! onStatusChange }
113
114
tooltipProps = { {
114
115
content :
115
116
status === 'open'
@@ -118,6 +119,7 @@ export function CommentsListItemContextMenu(props: CommentsListItemContextMenuPr
118
119
} }
119
120
/>
120
121
) }
122
+
121
123
{ hasContextMenuOptions && (
122
124
< MenuButton
123
125
id = "comment-actions-menu"
@@ -151,7 +153,7 @@ export function CommentsListItemContextMenu(props: CommentsListItemContextMenuPr
151
153
tone = "critical"
152
154
/>
153
155
154
- < MenuDivider hidden = { ! canDelete && ! canEdit } />
156
+ { onCopyLink && < MenuDivider hidden = { ! canDelete && ! canEdit } /> }
155
157
156
158
< MenuItem
157
159
hidden = { ! onCopyLink }
Original file line number Diff line number Diff line change
1
+ /* eslint-disable complexity */
1
2
import { hues } from '@sanity/color'
2
3
import { type CurrentUser } from '@sanity/types'
3
4
import {
@@ -412,13 +413,13 @@ export function CommentsListItemLayout(props: CommentsListItemLayoutProps) {
412
413
canEdit = { canEdit }
413
414
isParent = { isParent }
414
415
mode = { mode }
415
- onCopyLink = { handleCopyLink }
416
+ onCopyLink = { onCopyLink ? handleCopyLink : undefined }
416
417
onDeleteStart = { handleDelete }
417
418
onEditStart = { toggleEdit }
418
419
onMenuClose = { handleMenuClose }
419
420
onMenuOpen = { handleMenuOpen }
420
421
onReactionSelect = { handleReactionSelect }
421
- onStatusChange = { handleOpenStatusChange }
422
+ onStatusChange = { onStatusChange ? handleOpenStatusChange : undefined }
422
423
readOnly = { readOnly }
423
424
status = { comment . status }
424
425
/>
You can’t perform that action at this time.
0 commit comments