mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Feature/floating notifications calling and twitter (#112)
* Add floating notifications :O * Add phone notifications and refactor calling ui * This is unsafe * Fix controls null check * Remove go to alert * Fix phone stuck after call * Remove lazy mount for Phone * Fix open/close cl_main * Use effect for notification visibility * Remove all alerts when phone closes * Avoid re-render useNuiEvent * It works now :c
This commit is contained in:
1 parent
4633146d40
commit
f6d7a3dbe1
42 files changed
+869
-679
No files matched your search
@@ -8,8 +8,7 @@ import KeyboardArrowLeftIcon from '@material-ui/icons/KeyboardArrowLeft';
|
||||
import AppsIcon from '@material-ui/icons/Apps';
|
||||
import RadioButtonUncheckedIcon from '@material-ui/icons/RadioButtonUnchecked';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
|
||||
import Nui from '../../nui-events/utils/Nui';
|
||||
import { usePhone } from '../../phone/hooks/usePhone';
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@@ -19,10 +18,7 @@ const useStyles = makeStyles((theme) => ({
|
||||
}));
|
||||
|
||||
export const Navigation = () => {
|
||||
const closePhone = () => {
|
||||
console.log('Phone closed');
|
||||
Nui.send('phone:close');
|
||||
};
|
||||
const { closePhone } = usePhone();
|
||||
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
@@ -38,12 +34,12 @@ export const Navigation = () => {
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label='Close'
|
||||
value={() => closePhone()}
|
||||
value={closePhone}
|
||||
icon={<RadioButtonUncheckedIcon />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label='Back'
|
||||
value={() => history.goBack()}
|
||||
value={history.goBack}
|
||||
icon={<KeyboardArrowLeftIcon />}
|
||||
/>
|
||||
</BottomNavigation>
|
||||
|
||||
Reference in new issue
Block a user