mirror of
https://github.com/rjNemo/meal_planner
synced 2026-06-12 13:26:45 +00:00
cleanup
This commit is contained in:
parent
4c8ffd52f3
commit
bce9407986
5 changed files with 12 additions and 9 deletions
|
|
@ -59,6 +59,8 @@ Free meal planner for cooks short on ideas! (like me …)
|
||||||
- Send a daily suggestion to newsletter
|
- Send a daily suggestion to newsletter
|
||||||
- History
|
- History
|
||||||
- Language selection
|
- Language selection
|
||||||
|
- Nutritive value
|
||||||
|
- Add personal notes
|
||||||
|
|
||||||
## Supports
|
## Supports
|
||||||
|
|
||||||
|
|
@ -98,3 +100,4 @@ Free meal planner for cooks short on ideas! (like me …)
|
||||||
- code cleanup (props and refactoring)
|
- code cleanup (props and refactoring)
|
||||||
- Back to top button
|
- Back to top button
|
||||||
- Take a look at some components [here](http://react-materialize.github.io/react-materialize/?path=/story/css-grid--default)
|
- Take a look at some components [here](http://react-materialize.github.io/react-materialize/?path=/story/css-grid--default)
|
||||||
|
- Breadcrumb
|
||||||
|
|
|
||||||
|
|
@ -142,10 +142,7 @@ export const App = () => {
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route exact path="/categories">
|
<Route exact path="/categories">
|
||||||
<CategoryListPage
|
<CategoryListPage items={categories} getCategories={getCategories} />
|
||||||
categories={categories}
|
|
||||||
getCategories={getCategories}
|
|
||||||
/>
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
<Route path="/categories/:strCategory/">
|
<Route path="/categories/:strCategory/">
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Link, useRouteMatch } from "react-router-dom";
|
import { Link, useRouteMatch } from "react-router-dom";
|
||||||
|
|
||||||
const CategoryEntry = props => {
|
const CategoryEntry = ({ category }) => {
|
||||||
const {
|
const {
|
||||||
strCategory,
|
strCategory,
|
||||||
strCategoryThumb
|
strCategoryThumb
|
||||||
// strCategoryDescription
|
// strCategoryDescription
|
||||||
} = props.category;
|
} = category;
|
||||||
|
|
||||||
const { url } = useRouteMatch();
|
const { url } = useRouteMatch();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,9 @@ export const MealPresentation = props => {
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<b>Origin:</b> {mealArea}
|
<b>Origin:</b> {mealArea}
|
||||||
|
{/* <Link to={`/area/${mealArea}`}>
|
||||||
|
See every {mealArea} recipes
|
||||||
|
</Link> */}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import React, { useEffect } from "react";
|
import React, { useEffect } from "react";
|
||||||
import CategoryEntry from "../components/CategoryEntry";
|
import CategoryEntry from "../components/CategoryEntry";
|
||||||
|
|
||||||
export const CategoryListPage = props => {
|
export const CategoryListPage = ({ items, getCategories }) => {
|
||||||
const { categories } = props.categories;
|
const categories = items.categories;
|
||||||
const { getCategories } = props;
|
// const { getCategories } = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getCategories();
|
getCategories();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue