Skip to content

Commit

Permalink
Fixed removed logger on production
Browse files Browse the repository at this point in the history
  • Loading branch information
samilabud committed Mar 7, 2024
1 parent 6e9bb0c commit a305e1e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions client/src/redux/store.js
Original file line number Diff line number Diff line change
@@ -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));
Expand All @@ -20,4 +20,4 @@ sagaMiddleWare.run(rootSaga);

export const persistor = persistStore(store);

export default store;
export default store;

0 comments on commit a305e1e

Please sign in to comment.