-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Facundo Martinez
authored and
Facundo Martinez
committed
Feb 17, 2021
1 parent
0241f8d
commit 631523c
Showing
5 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
import { combineReducers } from "redux"; | ||
import { persistReducer } from "redux-persist"; | ||
import storage from "redux-persist/lib/storage"; | ||
|
||
import productsReducer from "./Product/products.reducers"; | ||
import userReducer from "./User/user.reducer"; | ||
import cartReducer from "./Cart/cart.reducers"; | ||
|
||
export default combineReducers({ | ||
export const rootReducer = combineReducers({ | ||
user: userReducer, | ||
productsData: productsReducer, | ||
cartData: cartReducer, | ||
}); | ||
|
||
const configStorage = { | ||
key: "root", | ||
storage, | ||
whitelist: ["cartData"], | ||
}; | ||
|
||
export default persistReducer(configStorage, rootReducer); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters