mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
feat(calling/client|server): partical functions for calling
Should probably reuse data
This commit is contained in:
commit
db3bd999f2
3 files changed
+33
-2
No files matched your search
@@ -5,6 +5,7 @@ import { AppTitle } from '../../ui/components/AppTitle';
|
||||
import { AppContent } from '../../ui/components/AppContent';
|
||||
import { useCall } from '../hooks/useCall';
|
||||
import CallIcon from '@material-ui/icons/Call';
|
||||
<<<<<<< HEAD
|
||||
import CallEndIcon from '@material-ui/icons/CallEnd';
|
||||
import useStyles from './modal.styles';
|
||||
import { useModal } from '../hooks/useModal';
|
||||
@@ -13,30 +14,60 @@ import Nui from '../../os/nui-events/utils/Nui';
|
||||
export const CallModal = () => {
|
||||
const { call } = useCall();
|
||||
const { setModal } = useModal()
|
||||
=======
|
||||
import PhoneDisabledIcon from '@material-ui/icons/PhoneDisabled';
|
||||
import CallEndIcon from '@material-ui/icons/CallEnd';
|
||||
import useStyles from './modal.styles';
|
||||
import { useModal } from '../hooks/useModal';
|
||||
|
||||
export const CallModal = () => {
|
||||
const { call, setCall } = useCall();
|
||||
const { setModal } = useModal()
|
||||
const [accepted, setAccepted] = useState(false)
|
||||
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||
|
||||
const classes = useStyles()
|
||||
|
||||
const handleAcceptCall = () => {
|
||||
<<<<<<< HEAD
|
||||
Nui.send('phone:acceptCall', {
|
||||
phoneNumber: call.phone_number
|
||||
})
|
||||
=======
|
||||
setAccepted(true)
|
||||
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||
}
|
||||
|
||||
const handleRejectCall = () => {
|
||||
setModal(false)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
setCall(null)
|
||||
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||
}
|
||||
|
||||
const handleEndCall = () => {
|
||||
setModal(false)
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
setCall(null)
|
||||
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||
}
|
||||
|
||||
return (
|
||||
<AppWrapper>
|
||||
<AppContent>
|
||||
<<<<<<< HEAD
|
||||
<h1 style={{ textAlign: 'center' }}>{call.transmitter ? call.target : call.caller}</h1>
|
||||
|
||||
<div className={classes.actions}>
|
||||
{!call.accepted ? (
|
||||
=======
|
||||
<h1 style={{ textAlign: 'center' }}>{call.target}</h1>
|
||||
|
||||
<div className={classes.actions}>
|
||||
{!accepted ? (
|
||||
>>>>>>> 28774d24d89468bd6804b82c6beb0e40a3cd4abf
|
||||
<>
|
||||
<Fab
|
||||
onClick={handleRejectCall}
|
||||
|
||||
Reference in new issue
Block a user