mirror of
https://github.com/tale/headplane.git
synced 2026-08-27 15:37:04 +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:')
|
!tag.startsWith('tag:')
|
||||||
&& 'opacity-50 cursor-not-allowed',
|
&& 'opacity-50 cursor-not-allowed',
|
||||||
)}
|
)}
|
||||||
isDisabled={!tag.startsWith('tag:')}
|
isDisabled={
|
||||||
|
tag.length === 0
|
||||||
|
|| !tag.startsWith('tag:')
|
||||||
|
|| tags.includes(tag)
|
||||||
|
}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
setTags([...tags, tag])
|
setTags([...tags, tag])
|
||||||
setTag('')
|
setTag('')
|
||||||
|
|||||||
Reference in New Issue
Block a user