@micromag/data 0.3.143 → 0.3.148
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.
- package/es/index.js +5 -2
- package/lib/index.js +5 -2
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -877,6 +877,8 @@ var useQuiz = function useQuiz() {
|
|
|
877
877
|
var useQuizCreate = function useQuizCreate() {
|
|
878
878
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
879
879
|
screenId = _ref.screenId,
|
|
880
|
+
_ref$visitorId = _ref.visitorId,
|
|
881
|
+
visitorId = _ref$visitorId === void 0 ? null : _ref$visitorId,
|
|
880
882
|
_ref$onSuccess = _ref.onSuccess,
|
|
881
883
|
onSuccess = _ref$onSuccess === void 0 ? null : _ref$onSuccess;
|
|
882
884
|
|
|
@@ -894,7 +896,8 @@ var useQuizCreate = function useQuizCreate() {
|
|
|
894
896
|
|
|
895
897
|
setCreating(true);
|
|
896
898
|
return api.quiz.create(_objectSpread({
|
|
897
|
-
screen_id: screenId
|
|
899
|
+
screen_id: screenId,
|
|
900
|
+
visitor_id: visitorId
|
|
898
901
|
}, data)).then(function (response) {
|
|
899
902
|
setCreating(false);
|
|
900
903
|
|
|
@@ -904,7 +907,7 @@ var useQuizCreate = function useQuizCreate() {
|
|
|
904
907
|
|
|
905
908
|
return response;
|
|
906
909
|
});
|
|
907
|
-
}, [api, setCreating, onSuccess, screenId]);
|
|
910
|
+
}, [api, setCreating, onSuccess, screenId, visitorId]);
|
|
908
911
|
return {
|
|
909
912
|
create: create,
|
|
910
913
|
creating: creating
|
package/lib/index.js
CHANGED
|
@@ -894,6 +894,8 @@ var useQuiz = function useQuiz() {
|
|
|
894
894
|
var useQuizCreate = function useQuizCreate() {
|
|
895
895
|
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
896
896
|
screenId = _ref.screenId,
|
|
897
|
+
_ref$visitorId = _ref.visitorId,
|
|
898
|
+
visitorId = _ref$visitorId === void 0 ? null : _ref$visitorId,
|
|
897
899
|
_ref$onSuccess = _ref.onSuccess,
|
|
898
900
|
onSuccess = _ref$onSuccess === void 0 ? null : _ref$onSuccess;
|
|
899
901
|
|
|
@@ -911,7 +913,8 @@ var useQuizCreate = function useQuizCreate() {
|
|
|
911
913
|
|
|
912
914
|
setCreating(true);
|
|
913
915
|
return api.quiz.create(_objectSpread__default["default"]({
|
|
914
|
-
screen_id: screenId
|
|
916
|
+
screen_id: screenId,
|
|
917
|
+
visitor_id: visitorId
|
|
915
918
|
}, data)).then(function (response) {
|
|
916
919
|
setCreating(false);
|
|
917
920
|
|
|
@@ -921,7 +924,7 @@ var useQuizCreate = function useQuizCreate() {
|
|
|
921
924
|
|
|
922
925
|
return response;
|
|
923
926
|
});
|
|
924
|
-
}, [api, setCreating, onSuccess, screenId]);
|
|
927
|
+
}, [api, setCreating, onSuccess, screenId, visitorId]);
|
|
925
928
|
return {
|
|
926
929
|
create: create,
|
|
927
930
|
creating: creating
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/data",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.148",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/fetch": "^0.1.15",
|
|
53
|
-
"@micromag/core": "^0.3.
|
|
53
|
+
"@micromag/core": "^0.3.148",
|
|
54
54
|
"prop-types": "^15.7.2",
|
|
55
55
|
"query-string": "^6.13.7",
|
|
56
56
|
"react-router": "^5.2.0"
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "b10cd7739e7de8595c26acc0e08d6e84220be17c"
|
|
62
62
|
}
|