Fixes
This commit is contained in:
@@ -315,7 +315,6 @@ export default function EditDish() {
|
||||
className={styles.textInput}
|
||||
label="Indeks glikemiczny"
|
||||
placeholder="np. 70"
|
||||
type="number"
|
||||
value={state.glicemicIndex}
|
||||
variant="outlined"
|
||||
onChange={(event) =>
|
||||
|
||||
@@ -310,7 +310,6 @@ export default function NewRestaurant() {
|
||||
<TextField
|
||||
className={styles.textInput}
|
||||
label="Porcja"
|
||||
type="number"
|
||||
placeholder="np. 150g"
|
||||
value={state.weight}
|
||||
variant="outlined"
|
||||
@@ -329,7 +328,6 @@ export default function NewRestaurant() {
|
||||
className={styles.textInput}
|
||||
label="Indeks glikemiczny"
|
||||
placeholder="np. 70"
|
||||
type="number"
|
||||
value={state.glicemicIndex}
|
||||
variant="outlined"
|
||||
onChange={(event) =>
|
||||
|
||||
@@ -18,12 +18,10 @@ export default function Restaurant(props) {
|
||||
const showDishList = useSelector((state) => state.data.showDishList);
|
||||
|
||||
useEffect(() => {
|
||||
if (restaurant._id !== id) {
|
||||
dispatch(fetchRestaurant(id));
|
||||
} else {
|
||||
document.title = restaurant.name;
|
||||
}
|
||||
});
|
||||
}, [dispatch, id]);
|
||||
|
||||
if (restaurant.name) document.title = restaurant.name;
|
||||
|
||||
return (
|
||||
<div className="restaurant-container">
|
||||
@@ -74,7 +72,7 @@ export default function Restaurant(props) {
|
||||
<h3>Lunch menu ({restaurant.lunchHours})</h3>
|
||||
)}
|
||||
{!showDishList && <CircularProgress />}
|
||||
{showDishList && <LunchMenu restaurant={restaurant} />}
|
||||
{(showDishList && restaurant.lunchMenu) && <LunchMenu restaurant={restaurant} />}
|
||||
<h3>Menu</h3>
|
||||
{!showDishList && <CircularProgress />}
|
||||
{showDishList && <DishList />}
|
||||
|
||||
Reference in New Issue
Block a user