@searpent/react-image-annotate 2.0.40 → 2.0.41
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/Annotator/index.js +9 -6
- package/package.json +1 -1
package/Annotator/index.js
CHANGED
|
@@ -155,30 +155,33 @@ export var Annotator = function Annotator(_ref) {
|
|
|
155
155
|
var _ref2 = _asyncToGenerator(
|
|
156
156
|
/*#__PURE__*/
|
|
157
157
|
_regeneratorRuntime.mark(function _callee(e) {
|
|
158
|
+
var createdAt;
|
|
158
159
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
159
160
|
while (1) {
|
|
160
161
|
switch (_context.prev = _context.next) {
|
|
161
162
|
case 0:
|
|
163
|
+
createdAt = new Date();
|
|
162
164
|
e.preventDefault();
|
|
163
165
|
|
|
164
166
|
if (!onSave) {
|
|
165
|
-
_context.next =
|
|
167
|
+
_context.next = 6;
|
|
166
168
|
break;
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
_context.next =
|
|
171
|
+
_context.next = 5;
|
|
170
172
|
return onSave({
|
|
171
173
|
images: state.images,
|
|
172
|
-
albumMetadata: state.albumMetadata
|
|
174
|
+
albumMetadata: state.albumMetadata,
|
|
175
|
+
createdAt: createdAt
|
|
173
176
|
});
|
|
174
177
|
|
|
175
|
-
case
|
|
178
|
+
case 5:
|
|
176
179
|
dispatchToReducer({
|
|
177
180
|
type: "IMAGES_SAVED",
|
|
178
|
-
savedAt:
|
|
181
|
+
savedAt: createdAt
|
|
179
182
|
});
|
|
180
183
|
|
|
181
|
-
case
|
|
184
|
+
case 6:
|
|
182
185
|
case "end":
|
|
183
186
|
return _context.stop();
|
|
184
187
|
}
|