move getQueryStringFromLocation to ui-components

This commit is contained in:
Sebastian Sdorra
2019-04-18 11:42:09 +02:00
parent bfd59c1bac
commit 37a53c295b
18 changed files with 98 additions and 69 deletions

View File

@@ -1,4 +1,6 @@
// @flow
import queryString from "query-string";
export const contextPath = window.ctxPath || "";
export function withContextPath(path: string) {
@@ -27,3 +29,7 @@ export function getPageFromMatch(match: any) {
}
return page;
}
export function getQueryStringFromLocation(location: any) {
return location.search ? queryString.parse(location.search).q : undefined;
}