mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
fix(CallModal): fixed nui requests and if-else inline
This commit is contained in:
1 parent
242d92acb3
commit
a3ef384f35
1 file changed
+8
-7
@@ -19,29 +19,30 @@ export const CallModal = () => {
|
|||||||
const handleAcceptCall = () => {
|
const handleAcceptCall = () => {
|
||||||
console.log('NUI CALL: ', call.phone_number);
|
console.log('NUI CALL: ', call.phone_number);
|
||||||
Nui.send('phone:acceptCall', {
|
Nui.send('phone:acceptCall', {
|
||||||
phoneNumber: call.target,
|
transmitterNumber: call.transmitter,
|
||||||
});
|
});
|
||||||
|
console.log("NOW BEING TRANSMITTER", call.transmitter)
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRejectCall = () => {
|
const handleRejectCall = () => {
|
||||||
setModal(false);
|
setModal(false);
|
||||||
Nui.send('phone:rejectCall', {
|
Nui.send('phone:rejectCall', {
|
||||||
phoneNumber: call.target,
|
phoneNumber: call.transmitter,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEndCall = () => {
|
const handleEndCall = () => {
|
||||||
setModal(false);
|
setModal(false)
|
||||||
Nui.send('phone:endCall', {
|
Nui.send('phone:endCall', {
|
||||||
phoneNumber: call.target,
|
transmitterNumber: call.transmitter,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (call.transmitter) {
|
if (call.isTransmitter) {
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
|
<h1 style={{ textAlign: 'center' }}>{call.receiver}</h1>
|
||||||
<div className={classes.actions}>
|
<div className={classes.actions}>
|
||||||
<Fab
|
<Fab
|
||||||
onClick={handleEndCall}
|
onClick={handleEndCall}
|
||||||
@@ -59,7 +60,7 @@ export const CallModal = () => {
|
|||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1 style={{ textAlign: 'center' }}>{call.caller}</h1>
|
<h1 style={{ textAlign: 'center' }}>{call.transmitter}</h1>
|
||||||
|
|
||||||
<div className={classes.actions}>
|
<div className={classes.actions}>
|
||||||
{!call.accepted ? (
|
{!call.accepted ? (
|
||||||
|
|||||||
Reference in new issue
Block a user