mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix new msg alone
This commit is contained in:
1 file changed
+3
-3
@@ -17,10 +17,10 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
|
|||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [participants, setParticipants] = useState(phoneNumber || '');
|
const [participants, setParticipants] = useState('');
|
||||||
const [label, setLabel] = useState('');
|
const [label, setLabel] = useState('');
|
||||||
|
|
||||||
useEffect(() => setParticipants(phoneNumber), [phoneNumber]);
|
useEffect(() => phoneNumber && setParticipants(phoneNumber), [phoneNumber]);
|
||||||
|
|
||||||
// handles phone numbers in a csv format and strips all spaces and
|
// handles phone numbers in a csv format and strips all spaces and
|
||||||
// external characters out of them:
|
// external characters out of them:
|
||||||
@@ -53,7 +53,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
|
|||||||
<form className={classes.newGroupForm} onSubmit={handleSubmit}>
|
<form className={classes.newGroupForm} onSubmit={handleSubmit}>
|
||||||
<TextField
|
<TextField
|
||||||
value={participants}
|
value={participants}
|
||||||
onChange={(e) => setParticipants(e.target.value)}
|
onChange={(e) => setParticipants(e.target.value || '')}
|
||||||
placeholder={t('APPS_MESSAGES_NEW_MESSAGE_GROUP')}
|
placeholder={t('APPS_MESSAGES_NEW_MESSAGE_GROUP')}
|
||||||
className={classes.newGroupinput}
|
className={classes.newGroupinput}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|||||||
Reference in new issue
Block a user