twitter char limit to 160 and added scroll

This commit is contained in:
Kire committed 2021-02-04 22:29:47 -05:00
1 parent 63aea89e2b
commit 1fca1ac200
3 files changed
+8 -2

No files matched your search

+1 -1
View File
@@ -20,7 +20,7 @@
"allowEdtiableProfileName": true, "allowEdtiableProfileName": true,
"allowDeleteTweets": true, "allowDeleteTweets": true,
"allowReportTweets": true, "allowReportTweets": true,
"characterLimit": 240, "characterLimit": 160,
"enableAvatars": true, "enableAvatars": true,
"enableEmojis": true, "enableEmojis": true,
"enableImages": true, "enableImages": true,
@@ -114,7 +114,11 @@ export const AddTweetModal = () => {
_handleClose(); _handleClose();
}; };
const handleMessageChange = (e) => setMessage(e.target.value); const handleMessageChange = (e: StandardInputProps['onChange']) => {
const message = e.target.value;
if (message.length > config.twitter.characterLimit) return;
setMessage(message)
}
const addImage = () => { const addImage = () => {
// strip any whitespace from the link in case the user // strip any whitespace from the link in case the user
@@ -9,6 +9,8 @@ const useStyles = makeStyles((theme) => ({
flex: '1 1 100%', flex: '1 1 100%',
padding: '10px 15px', padding: '10px 15px',
marginTop: '15px', marginTop: '15px',
overflowY: 'auto',
maxHeight: '300px',
}, },
textFieldInput: { textFieldInput: {
fontSize: '22px', fontSize: '22px',