dummy meals
This commit is contained in:
parent
25b9fba3ff
commit
cc3d72cfc1
@ -1 +1 @@
|
|||||||
[{"/code/gitea/udemy-react-course/ordering/src/index.js":"1","/code/gitea/udemy-react-course/ordering/src/App.js":"2","/code/gitea/udemy-react-course/ordering/src/components/Layout/Header.js":"3","/code/gitea/udemy-react-course/ordering/src/components/Layout/HeaderCartButton.js":"4","/code/gitea/udemy-react-course/ordering/src/components/Cart/CartIcon.js":"5"},{"size":179,"mtime":1648642748000,"results":"6","hashOfConfig":"7"},{"size":152,"mtime":1663957076489,"results":"8","hashOfConfig":"7"},{"size":550,"mtime":1663957391257,"results":"9","hashOfConfig":"7"},{"size":453,"mtime":1663957353508,"results":"10","hashOfConfig":"7"},{"size":488,"mtime":1663956419417,"results":"11","hashOfConfig":"7"},{"filePath":"12","messages":"13","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"gx63om",{"filePath":"14","messages":"15","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"16","messages":"17","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"18","messages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/code/gitea/udemy-react-course/ordering/src/index.js",[],"/code/gitea/udemy-react-course/ordering/src/App.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Layout/Header.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Layout/HeaderCartButton.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Cart/CartIcon.js",[]]
|
[{"/code/gitea/udemy-react-course/ordering/src/index.js":"1","/code/gitea/udemy-react-course/ordering/src/App.js":"2","/code/gitea/udemy-react-course/ordering/src/components/Layout/Header.js":"3","/code/gitea/udemy-react-course/ordering/src/components/Layout/HeaderCartButton.js":"4","/code/gitea/udemy-react-course/ordering/src/components/Cart/CartIcon.js":"5","/code/gitea/udemy-react-course/ordering/src/components/Meals/Meals.js":"6","/code/gitea/udemy-react-course/ordering/src/components/Meals/MealsSummary.js":"7","/code/gitea/udemy-react-course/ordering/src/components/Meals/AvailableMeals.js":"8","/code/gitea/udemy-react-course/ordering/src/components/Meals/dummy-meals.js":"9"},{"size":179,"mtime":1648642748000,"results":"10","hashOfConfig":"11"},{"size":262,"mtime":1663957809239,"results":"12","hashOfConfig":"11"},{"size":550,"mtime":1663957504588,"results":"13","hashOfConfig":"11"},{"size":453,"mtime":1663957524740,"results":"14","hashOfConfig":"11"},{"size":488,"mtime":1663956419417,"results":"15","hashOfConfig":"11"},{"size":233,"mtime":1663957780583,"results":"16","hashOfConfig":"11"},{"size":529,"mtime":1663957501324,"results":"17","hashOfConfig":"11"},{"size":749,"mtime":1663957905318,"results":"18","hashOfConfig":"11"},{"size":0,"mtime":1663957879313,"results":"19","hashOfConfig":"11"},{"filePath":"20","messages":"21","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"gx63om",{"filePath":"22","messages":"23","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"24","messages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"27","messages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"29","messages":"30","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"26"},{"filePath":"31","messages":"32","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"33","messages":"34","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"35","messages":"36","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"37","messages":"38","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/code/gitea/udemy-react-course/ordering/src/index.js",[],"/code/gitea/udemy-react-course/ordering/src/App.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Layout/Header.js",[],["39","40"],"/code/gitea/udemy-react-course/ordering/src/components/Layout/HeaderCartButton.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Cart/CartIcon.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Meals/Meals.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Meals/MealsSummary.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Meals/AvailableMeals.js",[],"/code/gitea/udemy-react-course/ordering/src/components/Meals/dummy-meals.js",[],{"ruleId":"41","replacedBy":"42"},{"ruleId":"43","replacedBy":"44"},"no-native-reassign",["45"],"no-negated-in-lhs",["46"],"no-global-assign","no-unsafe-negation"]
|
@ -1,8 +1,12 @@
|
|||||||
import Header from "./components/Layout/Header"
|
import Header from "./components/Layout/Header"
|
||||||
|
import Meals from "./components/Meals/Meals"
|
||||||
function App() {
|
function App() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header />
|
<Header />
|
||||||
|
<main>
|
||||||
|
<Meals />
|
||||||
|
</main>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
40
ordering/src/components/Meals/AvailableMeals.js
Normal file
40
ordering/src/components/Meals/AvailableMeals.js
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
import classes from "./AvailableMeals.module.css"
|
||||||
|
|
||||||
|
const DUMMY_MEALS = [
|
||||||
|
{
|
||||||
|
id: 'm1',
|
||||||
|
name: 'Sushi',
|
||||||
|
description: 'Finest fish and veggies',
|
||||||
|
price: 22.99,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'm2',
|
||||||
|
name: 'Schnitzel',
|
||||||
|
description: 'A german specialty!',
|
||||||
|
price: 16.5,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'm3',
|
||||||
|
name: 'Barbecue Burger',
|
||||||
|
description: 'American, raw, meaty',
|
||||||
|
price: 12.99,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'm4',
|
||||||
|
name: 'Green Bowl',
|
||||||
|
description: 'Healthy...and green...',
|
||||||
|
price: 18.99,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
function AvailableMeals() {
|
||||||
|
const mealsList = DUMMY_MEALS.map(meal => <li>{meal.name}</li>)
|
||||||
|
|
||||||
|
return (
|
||||||
|
<section className={classes.meals}>
|
||||||
|
<ul>{mealsList}</ul>
|
||||||
|
</section>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default AvailableMeals
|
12
ordering/src/components/Meals/Meals.js
Normal file
12
ordering/src/components/Meals/Meals.js
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import MealsSummary from "./MealsSummary"
|
||||||
|
import AvailableMeals from "./AvailableMeals"
|
||||||
|
function Meals() {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<MealsSummary />
|
||||||
|
<AvailableMeals />
|
||||||
|
</>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Meals
|
@ -1,26 +0,0 @@
|
|||||||
const DUMMY_MEALS = [
|
|
||||||
{
|
|
||||||
id: 'm1',
|
|
||||||
name: 'Sushi',
|
|
||||||
description: 'Finest fish and veggies',
|
|
||||||
price: 22.99,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'm2',
|
|
||||||
name: 'Schnitzel',
|
|
||||||
description: 'A german specialty!',
|
|
||||||
price: 16.5,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'm3',
|
|
||||||
name: 'Barbecue Burger',
|
|
||||||
description: 'American, raw, meaty',
|
|
||||||
price: 12.99,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 'm4',
|
|
||||||
name: 'Green Bowl',
|
|
||||||
description: 'Healthy...and green...',
|
|
||||||
price: 18.99,
|
|
||||||
},
|
|
||||||
];
|
|
Loading…
Reference in New Issue
Block a user