@micromag/screen-urbania-recommendation 0.3.417 → 0.3.420

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 CHANGED
@@ -241,10 +241,13 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
241
241
  setVisualModalOpened(true);
242
242
  }, 400);
243
243
  }
244
+ if (!current) {
245
+ setVisualModalOpened(false);
246
+ }
244
247
  return function () {
245
248
  clearTimeout(id);
246
249
  };
247
- }, [visualModalTransitioning, setVisualModalTransitioning]);
250
+ }, [visualModalTransitioning, setVisualModalTransitioning, current]);
248
251
  var onClickVisual = useCallback(function () {
249
252
  if (!visualModalOpened) {
250
253
  setVisualModalTransitioning(true);
@@ -265,7 +268,7 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
265
268
  } else {
266
269
  enableInteraction();
267
270
  }
268
- }, [visualModalOpened]);
271
+ }, [current, visualModalOpened]);
269
272
  useEffect(function () {
270
273
  var keyup = function keyup(e) {
271
274
  if (e.key === 'Escape') {
package/lib/index.js CHANGED
@@ -264,10 +264,13 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
264
264
  setVisualModalOpened(true);
265
265
  }, 400);
266
266
  }
267
+ if (!current) {
268
+ setVisualModalOpened(false);
269
+ }
267
270
  return function () {
268
271
  clearTimeout(id);
269
272
  };
270
- }, [visualModalTransitioning, setVisualModalTransitioning]);
273
+ }, [visualModalTransitioning, setVisualModalTransitioning, current]);
271
274
  var onClickVisual = React.useCallback(function () {
272
275
  if (!visualModalOpened) {
273
276
  setVisualModalTransitioning(true);
@@ -288,7 +291,7 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
288
291
  } else {
289
292
  enableInteraction();
290
293
  }
291
- }, [visualModalOpened]);
294
+ }, [current, visualModalOpened]);
292
295
  React.useEffect(function () {
293
296
  var keyup = function keyup(e) {
294
297
  if (e.key === 'Escape') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-urbania-recommendation",
3
- "version": "0.3.417",
3
+ "version": "0.3.420",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -50,18 +50,18 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@babel/runtime": "^7.13.10",
53
- "@micromag/core": "^0.3.417",
54
- "@micromag/element-background": "^0.3.417",
55
- "@micromag/element-button": "^0.3.417",
56
- "@micromag/element-container": "^0.3.417",
57
- "@micromag/element-footer": "^0.3.417",
58
- "@micromag/element-header": "^0.3.417",
59
- "@micromag/element-heading": "^0.3.417",
60
- "@micromag/element-layout": "^0.3.417",
61
- "@micromag/element-scroll": "^0.3.417",
62
- "@micromag/element-text": "^0.3.417",
63
- "@micromag/element-visual": "^0.3.417",
64
- "@micromag/transforms": "^0.3.417",
53
+ "@micromag/core": "^0.3.420",
54
+ "@micromag/element-background": "^0.3.420",
55
+ "@micromag/element-button": "^0.3.420",
56
+ "@micromag/element-container": "^0.3.420",
57
+ "@micromag/element-footer": "^0.3.420",
58
+ "@micromag/element-header": "^0.3.420",
59
+ "@micromag/element-heading": "^0.3.420",
60
+ "@micromag/element-layout": "^0.3.420",
61
+ "@micromag/element-scroll": "^0.3.420",
62
+ "@micromag/element-text": "^0.3.420",
63
+ "@micromag/element-visual": "^0.3.420",
64
+ "@micromag/transforms": "^0.3.420",
65
65
  "classnames": "^2.2.6",
66
66
  "lodash": "^4.17.21",
67
67
  "prop-types": "^15.7.2",
@@ -72,5 +72,5 @@
72
72
  "access": "public",
73
73
  "registry": "https://registry.npmjs.org/"
74
74
  },
75
- "gitHead": "5a0113a6eaafea5c33a6beece8ad581519f490bb"
75
+ "gitHead": "5b0f037a41c3bca07a5bce8f0dce205242f7ad17"
76
76
  }