Skip to content
Snippets Groups Projects
Commit 8f1427a6 authored by esikkala's avatar esikkala
Browse files

Use querystring module

parent a4a13486
No related branches found
No related tags found
No related merge requests found
...@@ -6387,7 +6387,8 @@ ...@@ -6387,7 +6387,8 @@
"decode-uri-component": { "decode-uri-component": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
"dev": true
}, },
"deep-equal": { "deep-equal": {
"version": "1.0.1", "version": "1.0.1",
...@@ -8200,7 +8201,8 @@ ...@@ -8200,7 +8201,8 @@
"ansi-regex": { "ansi-regex": {
"version": "2.1.1", "version": "2.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"aproba": { "aproba": {
"version": "1.2.0", "version": "1.2.0",
...@@ -8615,7 +8617,8 @@ ...@@ -8615,7 +8617,8 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.1", "version": "5.1.1",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"safer-buffer": { "safer-buffer": {
"version": "2.1.2", "version": "2.1.2",
...@@ -8671,6 +8674,7 @@ ...@@ -8671,6 +8674,7 @@
"version": "3.0.1", "version": "3.0.1",
"bundled": true, "bundled": true,
"dev": true, "dev": true,
"optional": true,
"requires": { "requires": {
"ansi-regex": "^2.0.0" "ansi-regex": "^2.0.0"
} }
...@@ -8714,12 +8718,14 @@ ...@@ -8714,12 +8718,14 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
}, },
"yallist": { "yallist": {
"version": "3.0.2", "version": "3.0.2",
"bundled": true, "bundled": true,
"dev": true "dev": true,
"optional": true
} }
} }
}, },
...@@ -13302,16 +13308,6 @@ ...@@ -13302,16 +13308,6 @@
"integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==",
"dev": true "dev": true
}, },
"query-string": {
"version": "5.1.1",
"resolved": "http://registry.npmjs.org/query-string/-/query-string-5.1.1.tgz",
"integrity": "sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw==",
"requires": {
"decode-uri-component": "^0.2.0",
"object-assign": "^4.1.0",
"strict-uri-encode": "^1.0.0"
}
},
"querystring": { "querystring": {
"version": "0.2.0", "version": "0.2.0",
"resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz",
...@@ -15220,11 +15216,6 @@ ...@@ -15220,11 +15216,6 @@
} }
} }
}, },
"strict-uri-encode": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz",
"integrity": "sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM="
},
"string-length": { "string-length": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz", "resolved": "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz",
......
...@@ -8,8 +8,8 @@ import TableRow from '@material-ui/core/TableRow'; ...@@ -8,8 +8,8 @@ import TableRow from '@material-ui/core/TableRow';
import Typography from '@material-ui/core/Typography'; import Typography from '@material-ui/core/Typography';
import CircularProgress from '@material-ui/core/CircularProgress'; import CircularProgress from '@material-ui/core/CircularProgress';
import purple from '@material-ui/core/colors/purple'; import purple from '@material-ui/core/colors/purple';
import querystring from 'querystring';
import ResultTableHead from './ResultTableHead'; import ResultTableHead from './ResultTableHead';
import { parse } from 'query-string';
import history from '../../History'; import history from '../../History';
const styles = () => ({ const styles = () => ({
...@@ -47,7 +47,7 @@ class ResultTable extends React.Component { ...@@ -47,7 +47,7 @@ class ResultTable extends React.Component {
page = this.props.data.page === -1 ? 0 : this.props.data.page; page = this.props.data.page === -1 ? 0 : this.props.data.page;
// console.log(`result table mounted WITHOUT page parameter, set page to ${page}`); // console.log(`result table mounted WITHOUT page parameter, set page to ${page}`);
} else { } else {
page = parseInt(parse(this.props.routeProps.location.search).page); page = parseInt(querystring.parse(this.props.routeProps.location.search).page);
// console.log(`result table mounted with page parameter, set page to ${page}`); // console.log(`result table mounted with page parameter, set page to ${page}`);
} }
this.props.updatePage(this.props.resultClass, page); this.props.updatePage(this.props.resultClass, page);
......
...@@ -2,7 +2,7 @@ import { of } from 'rxjs'; ...@@ -2,7 +2,7 @@ import { of } from 'rxjs';
import { ajax } from 'rxjs/ajax'; import { ajax } from 'rxjs/ajax';
import { mergeMap, map, withLatestFrom, catchError } from 'rxjs/operators'; import { mergeMap, map, withLatestFrom, catchError } from 'rxjs/operators';
import { combineEpics, ofType } from 'redux-observable'; import { combineEpics, ofType } from 'redux-observable';
import { stringify } from 'query-string'; import querystring from 'querystring';
import { has } from 'lodash'; import { has } from 'lodash';
import { import {
FETCH_PAGINATED_RESULTS, FETCH_PAGINATED_RESULTS,
...@@ -195,7 +195,7 @@ export const stateToUrl = ({ ...@@ -195,7 +195,7 @@ export const stateToUrl = ({
params.spatialFilters = JSON.stringify(spatialFilters); params.spatialFilters = JSON.stringify(spatialFilters);
} }
return stringify(params); return querystring.stringify(params);
}; };
const boundsToValues = bounds => { const boundsToValues = bounds => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment