Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
Merge pull request #421 from onaio/bug/420_gisida-createMapReducer-un…
Browse files Browse the repository at this point in the history
…defined

Solve bug createMapReducer undefined when importing from gisida
  • Loading branch information
kahummer authored Feb 24, 2020
2 parents 58b3b73 + b7fd394 commit 7d23500
Show file tree
Hide file tree
Showing 54 changed files with 8 additions and 5 deletions.
Empty file removed build/gisida.js
Empty file.
2 changes: 1 addition & 1 deletion build/gisida.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import locationsReducer from './store/reducers/locations';
import regions from './store/reducers/regions';
import styles from './store/reducers/styles';
import supersetConfig from './store/reducers/superset-config';
import MAP from './store/reducers/createMapReducer/createMapReducer';
import MAP, { createMapReducer } from './store/reducers/map';

// eslint-disable-next-line no-underscore-dangle, global-require
if (!global._babelPolyfill) require('babel-polyfill');
Expand All @@ -17,8 +17,8 @@ gisida.version = require('../package.json').version;
gisida.initStore = require('./store/initStore').default;
gisida.loadLayers = require('./store/initStore').loadLayers;
gisida.reducerRegistry = require('./store/reducerRegistry').default;
gisida.createMapReducer = require('./store/reducers/createMapReducer/createMapReducer').createMapReducer;

gisida.createMapReducer = createMapReducer
gisida.defaultReducers = {
APP,
filter,
Expand Down
1 change: 0 additions & 1 deletion src/store/reducers/createMapReducer/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/store/reducers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export { default as LOCATIONS } from './locations';
export { default as REGIONS } from './regions';
export { default as STYLES } from './styles';
export { default as SUPERSET_CONFIGS } from './superset-config';
export { default as MAP } from './createMapReducer/createMapReducer';
export { default as MAP } from './map/';
export { default as AUTH } from './auth';
4 changes: 4 additions & 0 deletions src/store/reducers/map/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import MAP, { createMapReducer } from './createMapReducer';

export { createMapReducer }; // exports the function to create a Map reducer
export default MAP; // exports the default Map reducer as the default export

0 comments on commit 7d23500

Please sign in to comment.