chore: apply next-safe-action patch

This commit is contained in:
Nicolas Meienberger 2023-10-12 22:26:34 +02:00
parent 39e8041a06
commit 23fb14b414
2 changed files with 9 additions and 8 deletions

View file

@ -1,5 +1,5 @@
diff --git a/dist/hook.mjs b/dist/hook.mjs
index 4f2ea0f6818194b906590f2467f788e66d3524d9..b949dd0576477b08958cbf7be91c8c47c57dbe56 100644
index 4f2ea0f6818194b906590f2467f788e66d3524d9..fcec224f19be119a922734e8a6fb7d1916921d8a 100644
--- a/dist/hook.mjs
+++ b/dist/hook.mjs
@@ -7,7 +7,7 @@ import {
@ -19,9 +19,10 @@ index 4f2ea0f6818194b906590f2467f788e66d3524d9..b949dd0576477b08958cbf7be91c8c47
- const hasErrored = typeof res.validationError !== "undefined" || typeof res.serverError !== "undefined" || typeof res.fetchError !== "undefined";
+ const hasSucceded = typeof res?.data !== "undefined";
+ const hasErrored =
+ typeof res?.validationError !== "undefined" ||
+ typeof res?.serverError !== "undefined" ||
+ typeof res?.fetchError !== "undefined";
+ typeof res === "undefined" ||
+ typeof res.validationError !== "undefined" ||
+ typeof res.serverError !== "undefined" ||
+ typeof res.fetchError !== "undefined";
const hasExecuted = hasSucceded || hasErrored;
return { hasExecuted, hasSucceded, hasErrored };
};
@ -109,4 +110,4 @@ index 4f2ea0f6818194b906590f2467f788e66d3524d9..b949dd0576477b08958cbf7be91c8c47
- useOptimisticAction
-};
+export { useAction, useOptimisticAction };
//# sourceMappingURL=hook.mjs.map
//# sourceMappingURL=hook.mjs.map

View file

@ -2,7 +2,7 @@ lockfileVersion: '6.0'
patchedDependencies:
next-safe-action@3.4.0:
hash: 5iyuucgttzwgjzgtlixn36fwhe
hash: qgf42rjgttuw3cdkp2gsi7r344
path: patches/next-safe-action@3.4.0.patch
importers:
@ -80,7 +80,7 @@ importers:
version: 2.20.2(next@13.5.4)(react@18.2.0)
next-safe-action:
specifier: ^3.4.0
version: 3.4.0(patch_hash=5iyuucgttzwgjzgtlixn36fwhe)(next@13.5.4)(react@18.2.0)(zod@3.21.4)
version: 3.4.0(patch_hash=qgf42rjgttuw3cdkp2gsi7r344)(next@13.5.4)(react@18.2.0)(zod@3.21.4)
pg:
specifier: ^8.11.3
version: 8.11.3
@ -8400,7 +8400,7 @@ packages:
react: 18.2.0
dev: true
/next-safe-action@3.4.0(patch_hash=5iyuucgttzwgjzgtlixn36fwhe)(next@13.5.4)(react@18.2.0)(zod@3.21.4):
/next-safe-action@3.4.0(patch_hash=qgf42rjgttuw3cdkp2gsi7r344)(next@13.5.4)(react@18.2.0)(zod@3.21.4):
resolution: {integrity: sha512-EUmcChSlfIjdHu2n6L4w3EQnb1Np9C2OEWObPSKggdK/IhihDDatsunZKGcuimxFO3JbBdpFiUYcMe2slbovUg==}
engines: {node: '>=16'}
peerDependencies: