mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 22:17:39 +00:00
fix(phone/twitter): resolve isValidMessage issue
This only returned false. This commit is a temporary fix, as we need to check if there is any whitepace no matter if there is text or not
This commit is contained in:
1 parent
b5a4c518d5
commit
a651eb9242
1 file changed
+2
-1
@@ -98,8 +98,9 @@ export const AddTweetModal = () => {
|
||||
|
||||
const isValidMessage = (message) => {
|
||||
if (message.length > characterLimit) return false;
|
||||
return getNewLineCount(message) > newLineLimit;
|
||||
if (getNewLineCount(message) < newLineLimit) return true;
|
||||
};
|
||||
|
||||
const submitTweet = () => {
|
||||
const cleanedMessage = message.trim();
|
||||
if (cleanedMessage.length === 0) return;
|
||||
|
||||
Reference in new issue
Block a user