mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 06:28:51 +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 classes = useStyles();
|
||||||
|
|
||||||
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,
|
phoneNumber: call.target,
|
||||||
});
|
});
|
||||||
@@ -26,45 +26,40 @@ export const CallModal = () => {
|
|||||||
const handleRejectCall = () => {
|
const handleRejectCall = () => {
|
||||||
setModal(false);
|
setModal(false);
|
||||||
Nui.send('phone:rejectCall', {
|
Nui.send('phone:rejectCall', {
|
||||||
phoneNumber: call.target
|
phoneNumber: call.target,
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEndCall = () => {
|
const handleEndCall = () => {
|
||||||
setModal(false);
|
setModal(false);
|
||||||
Nui.send('phone:endCall', {
|
Nui.send('phone:endCall', {
|
||||||
phoneNumber: call.target
|
phoneNumber: call.target,
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
if (call.transmitter) {
|
if (call.transmitter) {
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1 style={{ textAlign: 'center' }}>
|
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
|
||||||
{call.target}
|
<div className={classes.actions}>
|
||||||
</h1>
|
<Fab
|
||||||
<div className={classes.actions}>
|
onClick={handleEndCall}
|
||||||
<Fab
|
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
||||||
onClick={handleEndCall}
|
className={classes.actionButton}
|
||||||
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
>
|
||||||
className={classes.actionButton}
|
<CallEndIcon />
|
||||||
>
|
</Fab>
|
||||||
<CallEndIcon />
|
</div>
|
||||||
</Fab>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</AppWrapper>
|
</AppWrapper>
|
||||||
)
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1 style={{ textAlign: 'center' }}>
|
<h1 style={{ textAlign: 'center' }}>{call.caller}</h1>
|
||||||
{call.caller}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div className={classes.actions}>
|
<div className={classes.actions}>
|
||||||
{!call.accepted ? (
|
{!call.accepted ? (
|
||||||
|
|||||||
@@ -8,12 +8,11 @@ const useStyles = makeStyles((theme: Theme) => ({
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
alignContent: 'center',
|
alignContent: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
bottom: '10%'
|
bottom: '10%',
|
||||||
},
|
},
|
||||||
actionButton: {
|
actionButton: {
|
||||||
margin: 20,
|
margin: 20,
|
||||||
}
|
},
|
||||||
}))
|
}));
|
||||||
|
|
||||||
|
export default useStyles;
|
||||||
export default useStyles;
|
|
||||||
Reference in new issue
Block a user