mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Make navigation work
This commit is contained in:
1 parent
bcdcbf4bb3
commit
a21497153e
2 files changed
+6
-4
No files matched your search
@@ -8,6 +8,7 @@ import { grey } from "@material-ui/core/colors";
|
||||
import { fade } from "@material-ui/core/styles/colorManipulator";
|
||||
import KeyboardArrowLeftIcon from "@material-ui/icons/KeyboardArrowLeft";
|
||||
import AppsIcon from "@material-ui/icons/Apps";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
root: {
|
||||
@@ -21,11 +22,12 @@ const useStyles = makeStyles(() => ({
|
||||
|
||||
export const NavigationBar = ({ notifications = [] }) => {
|
||||
const classes = useStyles();
|
||||
const history = useHistory()
|
||||
|
||||
return (
|
||||
<BottomNavigation
|
||||
value={null}
|
||||
onChange={() => {}}
|
||||
className={classes.root}
|
||||
onChange={e => e.target.value === 'back' ? history.goBack() : history.push('/')}
|
||||
>
|
||||
<BottomNavigationAction
|
||||
label="Back"
|
||||
@@ -33,8 +35,8 @@ export const NavigationBar = ({ notifications = [] }) => {
|
||||
icon={<KeyboardArrowLeftIcon className={classes.icon} color="error" />}
|
||||
/>
|
||||
<BottomNavigationAction
|
||||
label="Favorites"
|
||||
value="favorites"
|
||||
label="Home"
|
||||
value="home"
|
||||
icon={<AppsIcon className={classes.icon} />}
|
||||
/>
|
||||
</BottomNavigation>
|
||||
|
||||
Whitespace-only changes.
Reference in new issue
Block a user