From a305e1e31b6fda7faf39b2027d8a591398520c5a Mon Sep 17 00:00:00 2001 From: Samil Abud Date: Thu, 7 Mar 2024 17:46:12 -0400 Subject: [PATCH] Fixed removed logger on production --- client/src/redux/store.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/client/src/redux/store.js b/client/src/redux/store.js index 50aacdc..d20ca4e 100644 --- a/client/src/redux/store.js +++ b/client/src/redux/store.js @@ -1,17 +1,17 @@ -import {createStore, applyMiddleware} from 'redux'; -import logger from 'redux-logger'; -import { persistStore } from 'redux-persist'; -import createSagaMiddleWare from 'redux-saga'; +import { createStore, applyMiddleware } from "redux"; +import logger from "redux-logger"; +import { persistStore } from "redux-persist"; +import createSagaMiddleWare from "redux-saga"; -import rootReducer from './root-reducer'; -import rootSaga from './root-saga'; +import rootReducer from "./root-reducer"; +import rootSaga from "./root-saga"; const sagaMiddleWare = createSagaMiddleWare(); const middlewares = [sagaMiddleWare]; -if(process.env.NODE_ENV==='development'){ - middlewares.push(logger); +if (process.env.NODE_ENV !== "production") { + middlewares.push(logger); } export const store = createStore(rootReducer, applyMiddleware(...middlewares)); @@ -20,4 +20,4 @@ sagaMiddleWare.run(rootSaga); export const persistor = persistStore(store); -export default store; \ No newline at end of file +export default store;