fix(TALE-4): prevent duplicate ACL tags from being added
This commit is contained in:
parent
1db385e716
commit
c60652e39f
@ -124,7 +124,11 @@ export default function Tags({ machine, state }: TagsProps) {
|
||||
!tag.startsWith('tag:')
|
||||
&& 'opacity-50 cursor-not-allowed',
|
||||
)}
|
||||
isDisabled={!tag.startsWith('tag:')}
|
||||
isDisabled={
|
||||
tag.length === 0
|
||||
|| !tag.startsWith('tag:')
|
||||
|| tags.includes(tag)
|
||||
}
|
||||
onPress={() => {
|
||||
setTags([...tags, tag])
|
||||
setTag('')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user