web client v0.5
//notifications //delete restaurant //change picture //redesigned data store
This commit is contained in:
22
src/components/Output/AppBackdrop.js
Normal file
22
src/components/Output/AppBackdrop.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
import Backdrop from "@material-ui/core/Backdrop";
|
||||
import CircularProgress from "@material-ui/core/CircularProgress";
|
||||
import { useSelector } from "react-redux";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
backdrop: {
|
||||
zIndex: theme.zIndex.drawer + 1,
|
||||
color: "#fff",
|
||||
},
|
||||
}));
|
||||
|
||||
export default function AppBackdrop() {
|
||||
const open = useSelector((state) => state.data.backdrop);
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<Backdrop className={classes.backdrop} open={open}>
|
||||
<CircularProgress color="inherit" />
|
||||
</Backdrop>
|
||||
);
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import ListItem from "@material-ui/core/ListItem";
|
||||
import FastfoodIcon from "@material-ui/icons/Fastfood";
|
||||
import Badge from "@material-ui/core/Badge";
|
||||
import { makeStyles } from "@material-ui/core/styles";
|
||||
import { useHistory } from "react-router-dom";
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
root: {
|
||||
@@ -25,7 +24,6 @@ const useStyles = makeStyles((theme) => ({
|
||||
}));
|
||||
|
||||
export default function ListItemRestaurant(props) {
|
||||
const history = useHistory();
|
||||
const styles = useStyles();
|
||||
const badgeData = {
|
||||
color: "",
|
||||
@@ -45,7 +43,7 @@ export default function ListItemRestaurant(props) {
|
||||
return (
|
||||
<ListItem
|
||||
button
|
||||
onClick={() => history.push(`/editRestaurant/${props.id}`)}
|
||||
onClick={() => props.onClick(`/editRestaurant/${props.id}`)}
|
||||
>
|
||||
<ListItemIcon>
|
||||
<Badge
|
||||
|
||||
@@ -1,13 +1,6 @@
|
||||
import logo from "../../public/logo_mint.svg";
|
||||
import React from "react";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
export default function LogoMain() {
|
||||
let appMode = useSelector((store) => store.appMode);
|
||||
|
||||
if (appMode === "init") {
|
||||
return <img src={logo} alt="Menui logo" className="logo" />;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
return <img src={logo} alt="Menui logo" className="logo" />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user