Skip to content

Commit 1248f8e

Browse files
fix(files): only show Share in context menu for files, not folders (#5147)
1 parent 3b78436 commit 1248f8e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

  • apps/sim/app/workspace/[workspaceId]/files

apps/sim/app/workspace/[workspaceId]/files/files.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,11 @@ export function Files() {
19961996
onRename={handleContextMenuRename}
19971997
onDelete={handleContextMenuDelete}
19981998
onMove={handleContextMenuMove}
1999-
onShare={canEdit ? handleContextMenuShare : undefined}
1999+
onShare={
2000+
canEdit && contextMenuItemRef.current?.kind === 'file'
2001+
? handleContextMenuShare
2002+
: undefined
2003+
}
20002004
moveOptions={contextMenuMoveOptions}
20012005
canEdit={canEdit}
20022006
selectedCount={selectedRowIds.size}

0 commit comments

Comments
 (0)