mirror of
https://github.com/tale/headplane.git
synced 2026-07-27 00:08:14 +00:00
fix(TALE-4): prevent duplicate ACL tags from being added
This commit is contained in:
@@ -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('')
|
||||
|
||||
Reference in New Issue
Block a user