Skip to content

Commit

Permalink
refactor(redux): sw-625 remove connectRouter (RedHatInsights#1045)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdcabrera committed Feb 15, 2023
1 parent 17a1d45 commit 61ba73c
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/redux/index.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
import { connect } from 'react-redux';
import { withRouter } from 'react-router-dom';
import { store } from './store';
import { reduxActions } from './actions';
import { reduxHelpers } from './common';
import { storeHooks } from './hooks';
import { reduxReducers } from './reducers';
import { reduxTypes } from './types';

/**
* Wrapper for applying Router Dom withRouter and Redux connect.
*
* @param {Function} mapStateToProps
* @param {Function} mapDispatchToProps
* @returns {Function}
*/
const connectRouter = (mapStateToProps, mapDispatchToProps) => component =>
withRouter(connect(mapStateToProps, mapDispatchToProps)(component));

export { connect, connectRouter, reduxActions, reduxHelpers, reduxReducers, reduxTypes, store, storeHooks };
export { connect, reduxActions, reduxHelpers, reduxReducers, reduxTypes, store, storeHooks };

0 comments on commit 61ba73c

Please sign in to comment.