diff --git a/src/components/Dialogs/EditDish.js b/src/components/Dialogs/EditDish.js index 6da7ea6..a8a8a6c 100644 --- a/src/components/Dialogs/EditDish.js +++ b/src/components/Dialogs/EditDish.js @@ -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) => diff --git a/src/components/Dialogs/NewDish.js b/src/components/Dialogs/NewDish.js index 876f8b2..d5fbdf9 100644 --- a/src/components/Dialogs/NewDish.js +++ b/src/components/Dialogs/NewDish.js @@ -310,7 +310,6 @@ export default function NewRestaurant() { diff --git a/src/components/Output/Restaurant.js b/src/components/Output/Restaurant.js index 655a776..0605d81 100644 --- a/src/components/Output/Restaurant.js +++ b/src/components/Output/Restaurant.js @@ -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 (
@@ -74,7 +72,7 @@ export default function Restaurant(props) {

Lunch menu ({restaurant.lunchHours})

)} {!showDishList && } - {showDishList && } + {(showDishList && restaurant.lunchMenu) && }

Menu

{!showDishList && } {showDishList && } diff --git a/src/styles/Dish.scss b/src/styles/Dish.scss index a7cc91a..a69ac3d 100644 --- a/src/styles/Dish.scss +++ b/src/styles/Dish.scss @@ -24,6 +24,7 @@ border-top-left-radius: 15px; border-bottom-left-radius: 15px; background-size: cover; + background-position: center; text-align: left; } diff --git a/src/styles/DishList.scss b/src/styles/DishList.scss index 27ba3f7..9bde03d 100644 --- a/src/styles/DishList.scss +++ b/src/styles/DishList.scss @@ -8,17 +8,17 @@ h4 { .carddish-container { background-color: #303030; - border-radius: 6px; + border-radius: 12px; margin: 2px auto 2px auto; padding: 8px; display: flex; justify-content: space-between; width: 95%; cursor: pointer; - transition: all 0.25s; + transition: all 0.2s; h2 { - font-weight: 300; + font-weight: 500; color: $main-color; margin-top: 1rem; } @@ -30,20 +30,22 @@ h4 { .carddish-img { background-color: $secondary-color; background-size: cover; + background-position: center; width: 120px; height: 120px; - border-radius: 6px; + border-radius: 12px; margin: 0px 14px 0px 0px; } .carddish-left { display: flex; h2 { - font-size: 1.2rem; + font-size: 1rem; margin: auto; } p { margin-left: auto; + color: $gray; } } diff --git a/src/styles/Pictograms.scss b/src/styles/Pictograms.scss index e8367b7..8165493 100644 --- a/src/styles/Pictograms.scss +++ b/src/styles/Pictograms.scss @@ -1,6 +1,6 @@ .pictograms-container { height: 30px; - margin: 8px 8px 0px 0px; + margin: 0px 8px 8px 0px; } .pictograms-container-separated {