Skip to content

Commit f16a35e

Browse files
web: hide delete-track action in playlist remove menu context
Co-authored-by: Ray Jacobson <raymondjacobson@users.noreply.github.com>
1 parent 78f27ac commit f16a35e

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

packages/web/src/components/table/components/OverflowMenuButton.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ export const OverflowMenuButton = (props: OverflowMenuButtonProps) => {
3030
uid,
3131
...other
3232
} = props
33-
const { includeEdit = true, isFavorited, isOwnerDeactivated, trackId } = other
33+
const {
34+
includeDelete = true,
35+
includeEdit = true,
36+
isFavorited,
37+
isOwnerDeactivated,
38+
trackId
39+
} = other
3440

3541
const removeMenuItem = {
3642
text: removeText,
@@ -45,6 +51,7 @@ export const OverflowMenuButton = (props: OverflowMenuButtonProps) => {
4551
...other,
4652
type: 'track' as const,
4753
mount: 'page',
54+
includeDelete: onRemove ? false : includeDelete,
4855
includeEdit,
4956
extraMenuItems: onRemove ? [removeMenuItem] : []
5057
}

0 commit comments

Comments
 (0)