feat: [for #18] limited message to 1000 (#23)

This commit is contained in:
ighmaz 2022-09-16 06:28:12 +05:30 committed by GitHub
parent 64144021c9
commit e891339907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,7 +31,7 @@ export const MessageForm = ({
}, [textFieldRef])
const canMessageBeSent = () => {
return textMessage.trim().length > 0 && !isMessageSending
return textMessage.trim().length > 0 && textMessage.trim().length < 1000 && !isMessageSending
}
const handleMessageChange = (event: React.ChangeEvent<HTMLInputElement>) => {