mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Prettified Code!
This commit is contained in:
1 parent
c8882a618b
commit
7cc3a47f7b
1 file changed
+14
-11
@@ -12,28 +12,30 @@ import Nui from '../../os/nui-events/utils/Nui';
|
|||||||
|
|
||||||
export const CallModal = () => {
|
export const CallModal = () => {
|
||||||
const { call } = useCall();
|
const { call } = useCall();
|
||||||
const { setModal } = useModal()
|
const { setModal } = useModal();
|
||||||
|
|
||||||
const classes = useStyles()
|
const classes = useStyles();
|
||||||
|
|
||||||
const handleAcceptCall = () => {
|
const handleAcceptCall = () => {
|
||||||
Nui.send('phone:acceptCall', {
|
Nui.send('phone:acceptCall', {
|
||||||
phoneNumber: call.phone_number
|
phoneNumber: call.phone_number,
|
||||||
})
|
});
|
||||||
}
|
};
|
||||||
|
|
||||||
const handleRejectCall = () => {
|
const handleRejectCall = () => {
|
||||||
setModal(false)
|
setModal(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
const handleEndCall = () => {
|
const handleEndCall = () => {
|
||||||
setModal(false)
|
setModal(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1 style={{ textAlign: 'center' }}>{call.transmitter ? call.target : call.caller}</h1>
|
<h1 style={{ textAlign: 'center' }}>
|
||||||
|
{call.transmitter ? call.target : call.caller}
|
||||||
|
</h1>
|
||||||
|
|
||||||
<div className={classes.actions}>
|
<div className={classes.actions}>
|
||||||
{!call.accepted ? (
|
{!call.accepted ? (
|
||||||
@@ -41,7 +43,8 @@ export const CallModal = () => {
|
|||||||
<Fab
|
<Fab
|
||||||
onClick={handleRejectCall}
|
onClick={handleRejectCall}
|
||||||
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
style={{ backgroundColor: '#e74c3c', color: '#fff' }}
|
||||||
className={classes.actionButton}>
|
className={classes.actionButton}
|
||||||
|
>
|
||||||
<CallEndIcon />
|
<CallEndIcon />
|
||||||
</Fab>
|
</Fab>
|
||||||
<Fab
|
<Fab
|
||||||
|
|||||||
Reference in new issue
Block a user