Prettified Code!

This commit is contained in:
itschip authored and GitHub Action committed 2021-01-26 20:43:20 +00:00
1 parent a7f3f50f3d
commit dbcfdd9eda
2 files changed
+21 -27

No files matched your search

+17 -22
View File
@@ -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 ? (
+4 -5
View File
@@ -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;