mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 06:28:52 +00:00
Prettified Code!
This commit is contained in:
1 parent
a7f3f50f3d
commit
dbcfdd9eda
2 files changed
+21
-27
No files matched your search
@@ -17,7 +17,7 @@ export const CallModal = () => {
|
||||
const classes = useStyles();
|
||||
|
||||
const handleAcceptCall = () => {
|
||||
console.log("NUI CALL: ", call.phone_number)
|
||||
console.log('NUI CALL: ', call.phone_number);
|
||||
Nui.send('phone:acceptCall', {
|
||||
phoneNumber: call.target,
|
||||
});
|
||||
@@ -26,45 +26,40 @@ export const CallModal = () => {
|
||||
const handleRejectCall = () => {
|
||||
setModal(false);
|
||||
Nui.send('phone:rejectCall', {
|
||||
phoneNumber: call.target
|
||||
})
|
||||
phoneNumber: call.target,
|
||||
});
|
||||
};
|
||||
|
||||
const handleEndCall = () => {
|
||||
setModal(false);
|
||||
Nui.send('phone:endCall', {
|
||||
phoneNumber: call.target
|
||||
})
|
||||
phoneNumber: call.target,
|
||||
});
|
||||
};
|
||||
|
||||
if (call.transmitter) {
|
||||
return (
|
||||
<AppWrapper>
|
||||
<AppContent>
|
||||
<h1 style={{ textAlign: 'center' }}>
|
||||
{call.target}
|
||||
</h1>
|
||||
<div className={classes.actions}>
|
||||
<Fab
|
||||
onClick={handleEndCall}
|
||||
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
||||
className={classes.actionButton}
|
||||
>
|
||||
<CallEndIcon />
|
||||
</Fab>
|
||||
</div>
|
||||
|
||||
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
|
||||
<div className={classes.actions}>
|
||||
<Fab
|
||||
onClick={handleEndCall}
|
||||
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
||||
className={classes.actionButton}
|
||||
>
|
||||
<CallEndIcon />
|
||||
</Fab>
|
||||
</div>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<AppWrapper>
|
||||
<AppContent>
|
||||
<h1 style={{ textAlign: 'center' }}>
|
||||
{call.caller}
|
||||
</h1>
|
||||
<h1 style={{ textAlign: 'center' }}>{call.caller}</h1>
|
||||
|
||||
<div className={classes.actions}>
|
||||
{!call.accepted ? (
|
||||
|
||||
@@ -8,12 +8,11 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
display: 'flex',
|
||||
alignContent: 'center',
|
||||
justifyContent: 'center',
|
||||
bottom: '10%'
|
||||
bottom: '10%',
|
||||
},
|
||||
actionButton: {
|
||||
margin: 20,
|
||||
}
|
||||
}))
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
export default useStyles;
|
||||
export default useStyles;
|
||||
Reference in new issue
Block a user