enforce length in TagInput

This commit is contained in:
Eric Bailey
2023-10-10 15:47:38 -05:00
parent 41c4b4af7b
commit b3bae78e30
+2 -1
View File
@@ -57,7 +57,8 @@ export function TagInput({
const onSubmitEditing = React.useCallback(() => {
const tag = sanitize(value)
if (tag.length > 0) {
// enforce max hashtag length
if (tag.length > 0 && tag.length <= 64) {
handleChangeTags(uniq([...tags, tag]).slice(0, max))
}