contentoh-components-library 21.1.65 → 21.1.66

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.
@@ -146,9 +146,21 @@ var CreateVersion = function CreateVersion(_ref) {
146
146
  setSelectedVersions((0, _objectSpread3.default)((0, _objectSpread3.default)({}, selectedVersions), {}, (0, _defineProperty2.default)({}, e.target.name, parseInt(e.target.value.slice(-1)))));
147
147
  };
148
148
 
149
- (0, _react.useEffect)(function () {
150
- getVersions();
151
- }, []);
149
+ (0, _react.useEffect)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
150
+ return _regenerator.default.wrap(function _callee3$(_context3) {
151
+ while (1) {
152
+ switch (_context3.prev = _context3.next) {
153
+ case 0:
154
+ _context3.next = 2;
155
+ return getVersions();
156
+
157
+ case 2:
158
+ case "end":
159
+ return _context3.stop();
160
+ }
161
+ }
162
+ }, _callee3);
163
+ })), []);
152
164
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Container, {
153
165
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
154
166
  className: "modal-container",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentoh-components-library",
3
- "version": "21.1.65",
3
+ "version": "21.1.66",
4
4
  "dependencies": {
5
5
  "@aws-amplify/auth": "^4.5.3",
6
6
  "@aws-amplify/datastore": "^3.11.0",
@@ -33,7 +33,7 @@ export const CreateVersion = ({ idArticle, version, setShowCreateVersion }) => {
33
33
  try {
34
34
  let data = {
35
35
  articleId: idArticle,
36
- isEmpty
36
+ isEmpty,
37
37
  };
38
38
 
39
39
  isEmpty && (data["version"] = selectedVersions);
@@ -59,8 +59,8 @@ export const CreateVersion = ({ idArticle, version, setShowCreateVersion }) => {
59
59
  });
60
60
  };
61
61
 
62
- useEffect(() => {
63
- getVersions();
62
+ useEffect(async () => {
63
+ await getVersions();
64
64
  }, []);
65
65
 
66
66
  return (