@gamelearn/arcade-components 1.4.18 → 1.4.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.
package/dist/components/cards-selector-puzzle-component/components/CardsSelectorPuzzleComponent.js
CHANGED
|
@@ -162,7 +162,20 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
162
162
|
var pickedCard = specificFeedbacks.correctFeedbacks.find(function (greenCard) {
|
|
163
163
|
return greenCard.id === cardId;
|
|
164
164
|
});
|
|
165
|
-
|
|
165
|
+
|
|
166
|
+
if (pickedCard !== null && pickedCard !== void 0 && pickedCard.desc) {
|
|
167
|
+
setFeedBackText(pickedCard.desc);
|
|
168
|
+
} else {
|
|
169
|
+
setTimeout(function () {
|
|
170
|
+
playSound('score');
|
|
171
|
+
handleFeedbackFuncionOnClose();
|
|
172
|
+
emitEvent({
|
|
173
|
+
type: 'hidePuzzleButtons',
|
|
174
|
+
payload: false
|
|
175
|
+
});
|
|
176
|
+
}, 2000);
|
|
177
|
+
}
|
|
178
|
+
|
|
166
179
|
setRightPick(true);
|
|
167
180
|
setFeedbackIsShown(true);
|
|
168
181
|
setRewards([].concat(_toConsumableArray(accRewards), [pickedCard === null || pickedCard === void 0 ? void 0 : pickedCard.rewards]));
|
|
@@ -181,10 +194,9 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
181
194
|
});
|
|
182
195
|
setRightPick(false);
|
|
183
196
|
|
|
184
|
-
if (failedCard) {
|
|
197
|
+
if (failedCard !== null && failedCard !== void 0 && failedCard.desc) {
|
|
185
198
|
setFeedBackText(failedCard.desc);
|
|
186
199
|
setFeedbackIsShown(true);
|
|
187
|
-
setRewards([].concat(_toConsumableArray(accRewards), [failedCard === null || failedCard === void 0 ? void 0 : failedCard.rewards]));
|
|
188
200
|
} else {
|
|
189
201
|
setFeedbackIsShown(true);
|
|
190
202
|
setTimeout(function () {
|
|
@@ -193,8 +205,10 @@ var CardsSelectorPuzzleComponent = function CardsSelectorPuzzleComponent(_ref) {
|
|
|
193
205
|
type: 'hidePuzzleButtons',
|
|
194
206
|
payload: false
|
|
195
207
|
});
|
|
196
|
-
},
|
|
208
|
+
}, 2000);
|
|
197
209
|
}
|
|
210
|
+
|
|
211
|
+
setRewards([].concat(_toConsumableArray(accRewards), [failedCard === null || failedCard === void 0 ? void 0 : failedCard.rewards]));
|
|
198
212
|
} // si hay feedback definido
|
|
199
213
|
else if (info.solution.wrong.desc) {
|
|
200
214
|
setFeedBackText(info.solution.wrong.desc);
|