@gamelearn/arcade-components 2.9.0 → 2.10.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.
|
@@ -223,6 +223,11 @@ var TestComponent = function TestComponent(_ref) {
|
|
|
223
223
|
var rewards = resultAnswers.reduce(function (acc, current) {
|
|
224
224
|
return [].concat(_toConsumableArray(acc), _toConsumableArray(current.rewards));
|
|
225
225
|
}, []);
|
|
226
|
+
|
|
227
|
+
if (timeOver && countdown.rewards) {
|
|
228
|
+
rewards = [].concat(_toConsumableArray(rewards), _toConsumableArray(countdown.rewards));
|
|
229
|
+
}
|
|
230
|
+
|
|
226
231
|
emitEvent({
|
|
227
232
|
type: 'addPoints',
|
|
228
233
|
payload: rewards,
|
|
@@ -102,7 +102,13 @@ var mockProps = {
|
|
|
102
102
|
var mockProps2 = _objectSpread(_objectSpread({}, mockProps), {}, {
|
|
103
103
|
countdown: {
|
|
104
104
|
time: 5,
|
|
105
|
-
text: 'se te acabao el tiempo'
|
|
105
|
+
text: 'se te acabao el tiempo',
|
|
106
|
+
rewards: [{
|
|
107
|
+
id: 'id010001',
|
|
108
|
+
name: 'love',
|
|
109
|
+
points: -25,
|
|
110
|
+
type: 'score'
|
|
111
|
+
}]
|
|
106
112
|
}
|
|
107
113
|
});
|
|
108
114
|
|