mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(phone/messages): change how we get source | remove useEffect for parts
This commit is contained in:
1 parent
be479d75cc
commit
4f69ae2266
1 file changed
+1
-3
@@ -19,8 +19,6 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
|
|||||||
const [participants, setParticipants] = useState('');
|
const [participants, setParticipants] = useState('');
|
||||||
const [label, setLabel] = useState('');
|
const [label, setLabel] = useState('');
|
||||||
|
|
||||||
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:
|
||||||
// 123-4567, 987-6543, 333-4444
|
// 123-4567, 987-6543, 333-4444
|
||||||
@@ -37,7 +35,7 @@ const NewMessageGroupForm = ({ phoneNumber }: { phoneNumber?: string }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (phoneNumber) {
|
if (phoneNumber) {
|
||||||
sendNuiCreateMessageGroup({ parts: getGroupParts(phoneNumber), isGroupChat: false, labelValue });
|
sendNuiCreateMessageGroup({ parts: getGroupParts(phoneNumber), isGroupChat: false, labelValue: null });
|
||||||
history.push('/messages');
|
history.push('/messages');
|
||||||
}
|
}
|
||||||
}, [phoneNumber, labelValue, history, getGroupParts]);
|
}, [phoneNumber, labelValue, history, getGroupParts]);
|
||||||
|
|||||||
Reference in new issue
Block a user