@arkyn/components 1.3.150 → 1.3.152

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- {"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAmBA,iBAAS,aAAa,SAuCrB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"useAutomation.d.ts","sourceRoot":"","sources":["../../src/hooks/useAutomation.ts"],"names":[],"mappings":"AAmBA,iBAAS,aAAa,SA4CrB;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -30,6 +30,11 @@ function useAutomation() {
30
30
  if (closeModalKey)
31
31
  closeModal(closeModalKey);
32
32
  }, [actionData]);
33
+ useEffect(() => {
34
+ const closeAllModals = actionData?.closeAllModals;
35
+ if (typeof closeAllModals === "boolean" && closeAllModals)
36
+ closeAll();
37
+ }, [actionData]);
33
38
  useEffect(() => {
34
39
  const existsToast = actionData?.toast;
35
40
  const existsMessage = actionData?.message;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arkyn/components",
3
- "version": "1.3.150",
3
+ "version": "1.3.152",
4
4
  "main": "./dist/bundle.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Lucas Gonçalves",
@@ -40,6 +40,11 @@ function useAutomation() {
40
40
  if (closeModalKey) closeModal(closeModalKey);
41
41
  }, [actionData]);
42
42
 
43
+ useEffect(() => {
44
+ const closeAllModals = actionData?.closeAllModals;
45
+ if (typeof closeAllModals === "boolean" && closeAllModals) closeAll();
46
+ }, [actionData]);
47
+
43
48
  useEffect(() => {
44
49
  const existsToast = actionData?.toast;
45
50
  const existsMessage = actionData?.message;