tenjin-ui-kit 0.2.20 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -93,13 +93,8 @@ var AuthenticationProvider = function AuthenticationProvider(_ref) {
93
93
  };
94
94
  }();
95
95
  var redirectToLogin = function redirectToLogin() {
96
- // const redirectUrl =
97
- // process.env.NODE_ENV === "production"
98
- // ? location.pathname
99
- // : `${window.location.protocol}//${window.location.hostname}:${window.location.port}${location.pathname}`;
100
- // window.location.href =
101
- // process.env.REACT_APP_LOGIN_URL +
102
- // `?redirect_url=${encodeURIComponent(redirectUrl)}`;
96
+ var redirectUrl = process.env.NODE_ENV === "production" ? location.pathname : "".concat(window.location.protocol, "//").concat(window.location.hostname, ":").concat(window.location.port).concat(location.pathname);
97
+ window.location.href = process.env.REACT_APP_LOGIN_URL + "?redirect_url=".concat(encodeURIComponent(redirectUrl));
103
98
  };
104
99
  var clearTokenFromSearchParams = function clearTokenFromSearchParams() {
105
100
  searchParams.delete(LS_ACCESS_TOKEN_KEY);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tenjin-ui-kit",
3
- "version": "0.2.20",
3
+ "version": "0.2.21",
4
4
  "repository": {
5
5
  "url": "https://gitlab.com/yethi/react/tenjin-ui-kit.git"
6
6
  },