mirror of
https://github.com/sigmasternchen/tagify
synced 2025-03-15 07:08:55 +00:00
feat: already existing tags can't be added again
This commit is contained in:
parent
984da2c2bc
commit
d50c062d80
1 changed files with 7 additions and 4 deletions
|
@ -58,10 +58,13 @@ const MediaDetails: FunctionComponent<MediaDetailsProps> = ({basePath, file, onU
|
|||
setNewTagInput(value)
|
||||
}}
|
||||
/>
|
||||
<button onClick={() => {
|
||||
addTag(newTagInput)
|
||||
setNewTagInput("")
|
||||
}}>
|
||||
<button
|
||||
onClick={() => {
|
||||
addTag(newTagInput)
|
||||
setNewTagInput("")
|
||||
}}
|
||||
disabled={currentFile.getTags().indexOf(newTagInput) >= 0}
|
||||
>
|
||||
Add
|
||||
</button>
|
||||
</li>
|
||||
|
|
Loading…
Reference in a new issue