Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 92c4922

Browse files
authored
fix: LSDV-5259: Duplication of annotations can only happen if creation is allowed. (#1457)
1 parent ccc18c4 commit 92c4922

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/AnnotationsCarousel/AnnotationButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ export const AnnotationButton = observer(({ entity, capabilities, annotationStor
108108
const isPrediction = entity.type === 'prediction';
109109
const isDraft = !isDefined(entity.pk);
110110
const showGroundTruth = capabilities.groundTruthEnabled && !isPrediction && !isDraft;
111+
const showDuplicateAnnotation = capabilities.enableCreateAnnotation && !isDraft;
111112

112113
return (
113114
<Block name="AnnotationButtonContextMenu">
@@ -125,7 +126,7 @@ export const AnnotationButton = observer(({ entity, capabilities, annotationStor
125126
as Ground Truth
126127
</Elem>
127128
)}
128-
{!isDraft && (
129+
{showDuplicateAnnotation && (
129130
<Elem name="option" mod={{ duplicate: true }} onClick={duplicateAnnotation}>
130131
<Elem name="icon">
131132
<IconDuplicate width={20} height={24} />

0 commit comments

Comments
 (0)