Skip to content

Commit

Permalink
Changing the Order of our ingredients Manually
Browse files Browse the repository at this point in the history
  • Loading branch information
Ch-sriram committed Aug 27, 2020
1 parent fb44a04 commit 88607a0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,4 @@ Dependency Installation: **`npm i --save redux-thunk`**
4. Setting Up **[`redux-thunk`](https://github.com/reduxjs/redux-thunk#installation)** & **[`Redux DevTools`](https://github.com/zalmoxisus/redux-devtools-extension#12-advanced-store-setup)** to Execute Asynchronous Code: [Commit Details](https://github.com/Ch-sriram/burger-builder/commit/91ed3a4478ac6b568f09beb98c1a60d6acde97ce)
5. Fetching `ingredients` Asynchronously from the **[Firebase-Backend](https://burger-builder-ram.firebaseio.com/ingredients.json)**: [Commit Details](https://github.com/Ch-sriram/burger-builder/commit/bca5060d328da1dfa7fd6b65eb5c9c2da0768a3f)
6. Initializing `ingredients` in the `<BurgerBuilder />` Component: [Commit Details](https://github.com/Ch-sriram/burger-builder/commit/c53894fff653877d267a8980e8ec466c926f36bd)
7. Changing the Order of our `ingredients` Manually: [Commit Details]()
7 changes: 6 additions & 1 deletion src/store/reducers/burgerBuilder.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,12 @@ const reducer = (state = initialState, action) => {
case actionTypes.SET_INGREDIENTS:
return {
...state,
ingredients: action.ingredients,
ingredients: {
salad: action.ingredients.salad,
bacon: action.ingredients.bacon,
cheese: action.ingredients.cheese,
meat: action.ingredients.meat,
},
error: false,
}

Expand Down

0 comments on commit 88607a0

Please sign in to comment.