Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Commit 9259d01

Browse files
committed
parse url without querystring module that is causing build problems
1 parent e256c38 commit 9259d01

3 files changed

Lines changed: 8 additions & 24 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"es6-promisify": "^6.0.0",
2525
"grommet": "^1.1.0",
2626
"prop-types": "^15.5.8",
27-
"query-string": "^6.1.0",
2827
"react": "^16.0.0",
2928
"react-dom": "^16.0.0",
3029
"react-intl": "^2.2.3",

src/components/XCSpyApp.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { Dispatch } from "redux";
1313
import { setCompositionModel, initSession } from "../actions";
1414
import { withRouter, Redirect } from "react-router-dom";
1515
import { routes } from "../utils/routes";
16-
import * as queryString from "query-string";
1716

1817
interface XCSpyAppGlobalProps extends XCSpyAppProps, XCSpyAppCallbackProps {
1918
}
@@ -72,15 +71,16 @@ class XCSpyApp extends React.Component<XCSpyAppGlobalProps, XCSpyState> {
7271
}
7372

7473
const mapStateToProps = (state: XCSpyState, ownProps): XCSpyAppProps => {
75-
const values = queryString.parse(ownProps.location.search);
76-
const currentComponent = values[routes.params.currentComponent];
77-
const serverUrl = values[routes.params.serverUrl];
78-
const api = values[routes.params.api];
74+
const values = {};
75+
ownProps.location.search.replace("?", "").split("&").forEach(element => {
76+
const s = element.split("=");
77+
values[s[0]] = s[1];
78+
});
7979
return {
8080
initialized: state.compositionModel.initialized,
81-
api,
82-
serverUrl,
83-
currentComponent
81+
api: values[routes.params.api],
82+
serverUrl: values[routes.params.serverUrl],
83+
currentComponent: values[routes.params.currentComponent]
8484
};
8585
};
8686

yarn.lock

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,10 +1407,6 @@ decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2:
14071407
version "1.2.0"
14081408
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
14091409

1410-
decode-uri-component@^0.2.0:
1411-
version "0.2.0"
1412-
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
1413-
14141410
deep-assign@^2.0.0:
14151411
version "2.0.0"
14161412
resolved "https://registry.yarnpkg.com/deep-assign/-/deep-assign-2.0.0.tgz#ebe06b1f07f08dae597620e3dd1622f371a1c572"
@@ -4763,13 +4759,6 @@ query-string@^4.1.0:
47634759
object-assign "^4.1.0"
47644760
strict-uri-encode "^1.0.0"
47654761

4766-
query-string@^6.1.0:
4767-
version "6.1.0"
4768-
resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.1.0.tgz#01e7d69f6a0940dac67a937d6c6325647aa4532a"
4769-
dependencies:
4770-
decode-uri-component "^0.2.0"
4771-
strict-uri-encode "^2.0.0"
4772-
47734762
querystring-es3@^0.2.0:
47744763
version "0.2.1"
47754764
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
@@ -5694,10 +5683,6 @@ strict-uri-encode@^1.0.0:
56945683
version "1.1.0"
56955684
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
56965685

5697-
strict-uri-encode@^2.0.0:
5698-
version "2.0.0"
5699-
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
5700-
57015686
string-length@^1.0.1:
57025687
version "1.0.1"
57035688
resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac"

0 commit comments

Comments
 (0)