@portnet/ui 5.0.18 → 5.0.19

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.
@@ -42,7 +42,8 @@ const PuiHelpWidgetProvider = _ref => {
42
42
  baseURL
43
43
  });
44
44
  instance.interceptors.request.use(config => {
45
- config.headers.Authorization = "Bearer ".concat(token);
45
+ const activeToken = token || sessionStorage.getItem("access_token");
46
+ config.headers.Authorization = "Bearer ".concat(activeToken);
46
47
  return config;
47
48
  });
48
49
  instance.interceptors.response.use(res => res, err => {
@@ -65,7 +66,7 @@ const PuiHelpWidgetProvider = _ref => {
65
66
  guideImageService: (0, _guideImageService.default)(publicAxiosInstance),
66
67
  tijariaUrl,
67
68
  apiAuthUrl,
68
- token
69
+ token: token || sessionStorage.getItem("access_token")
69
70
  };
70
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRedux.Provider, {
71
72
  store: widgetStore,
@@ -61,7 +61,7 @@ const useListServiceReclamation = exports.useListServiceReclamation = function u
61
61
  queryKey: ["get_list_service_reclamation", portailId],
62
62
  queryFn: () =>
63
63
  // portailId === ID_PMPCE
64
- portailId ? reclamationApi.getListServiceReclamationByPortailApi(portailId) : reclamationApi.getListServiceReclamationApi(),
64
+ portailId !== null ? reclamationApi.getListServiceReclamationByPortailApi(portailId) : reclamationApi.getListServiceReclamationApi(),
65
65
  initialData: {},
66
66
  retry: 1,
67
67
  refetchOnWindowFocus: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portnet/ui",
3
- "version": "5.0.18",
3
+ "version": "5.0.19",
4
4
  "description": "Portnet UI",
5
5
  "keywords": [
6
6
  "react",