mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
working typescript version
This commit is contained in:
1 parent
581d6011e0
commit
cff746aa38
119 files changed
+247
-189
No files matched your search
@@ -0,0 +1,57 @@
|
||||
import React from "react";
|
||||
import {
|
||||
makeStyles,
|
||||
BottomNavigation,
|
||||
BottomNavigationAction,
|
||||
} from "@material-ui/core";
|
||||
import KeyboardArrowLeftIcon from "@material-ui/icons/KeyboardArrowLeft";
|
||||
import AppsIcon from "@material-ui/icons/Apps";
|
||||
import PhoneIcon from "@material-ui/icons/Phone";
|
||||
import RadioButtonUncheckedIcon from "@material-ui/icons/RadioButtonUnchecked";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
import Nui from "../../nui-events/utils/Nui";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
zIndex: 2,
|
||||
backgroundColor: theme.palette.background.default,
|
||||
},
|
||||
}));
|
||||
|
||||
export const Navigation = () => {
|
||||
const closePhone = () => {
|
||||
console.log("Phone closed");
|
||||
Nui.send("phone:close");
|
||||
};
|
||||
|
||||
const classes = useStyles();
|
||||
const history = useHistory();
|
||||
return (
|
||||
<BottomNavigation
|
||||
className={classes.root}
|
||||
onChange={(_e, value) => value()}
|
||||
>
|
||||
<BottomNavigationAction
|
||||
label="Phone"
|
||||
value={() => history.push("/phone")}
|
||||
icon={<PhoneIcon className={classes.icon} />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Home"
|
||||
value={() => history.push("/")}
|
||||
icon={<AppsIcon className={classes.icon} />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Close"
|
||||
value={() => closePhone()}
|
||||
icon={<RadioButtonUncheckedIcon className={classes.icon} />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Back"
|
||||
value={() => history.goBack()}
|
||||
icon={<KeyboardArrowLeftIcon />}
|
||||
/>
|
||||
</BottomNavigation>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user