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
+11 -17

No files matched your search

+8 -13
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,24 +26,22 @@ 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>
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
<div className={classes.actions}>
<Fab
onClick={handleEndCall}
@@ -53,18 +51,15 @@ export const CallModal = () => {
<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 ? (
+3 -4
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;