@trycourier/react-provider 5.1.3-internal.e22afd0.0 → 6.0.1-internal.ce6fc4c.0

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.
@@ -29,11 +29,16 @@ var useCourierActions = function useCourierActions(state, dispatch) {
29
29
  userId: state.userId,
30
30
  userSignature: state.userSignature
31
31
  });
32
+ var clientKey = state.clientKey; //ensure we always have a clientkey
33
+
34
+ if (!clientKey && state.authorization) {
35
+ clientKey = "JWT_AUTH";
36
+ }
32
37
 
33
38
  _courierJs["default"].init({
34
39
  baseUrl: state.apiUrl,
35
40
  authorization: state.authorization,
36
- clientKey: state.clientKey,
41
+ clientKey: clientKey,
37
42
  userId: state.userId,
38
43
  userSignature: state.userSignature
39
44
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trycourier/react-provider",
3
- "version": "5.1.3-internal.e22afd0.0+e22afd0",
3
+ "version": "6.0.1-internal.ce6fc4c.0+ce6fc4c",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "typings/index.d.ts",
@@ -16,7 +16,8 @@
16
16
  },
17
17
  "license": "ISC",
18
18
  "dependencies": {
19
- "@trycourier/client-graphql": "^5.1.3-internal.e22afd0.0+e22afd0",
19
+ "@trycourier/client-graphql": "^6.0.1-internal.ce6fc4c.0+ce6fc4c",
20
+ "@trycourier/courier-js": "^1.4.2",
20
21
  "buffer": "^6.0.3",
21
22
  "jwt-decode": "^3.1.2",
22
23
  "react-use": "^17.2.1",
@@ -33,5 +34,5 @@
33
34
  "dist/",
34
35
  "typings/"
35
36
  ],
36
- "gitHead": "e22afd02bea2ff4c008be9a11e4be7f75fd76f0a"
37
+ "gitHead": "ce6fc4c8fa63c74d22b52ad32d69f03468dc2117"
37
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"use-courier-actions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-courier-actions.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,iBAAiB,iCAAsB,eA4G5C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"use-courier-actions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-courier-actions.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,iBAAiB,iCAAsB,eAmH5C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}