@pradip1995/segment-product-card 0.3.11 → 0.3.12
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pradip1995/segment-product-card",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.12",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@pradip1995/commerce-core": "^4.0.0",
|
|
26
26
|
"@pradip1995/plugin-sdk": "^0.2.0",
|
|
27
|
+
"next": ">=15",
|
|
27
28
|
"react": ">=19",
|
|
28
|
-
"react-dom": ">=19"
|
|
29
|
-
"next": ">=15"
|
|
29
|
+
"react-dom": ">=19"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@pradip1995/segment-primitives": "^0.4.
|
|
32
|
+
"@pradip1995/segment-primitives": "^0.4.2",
|
|
33
33
|
"@pradip1995/segment-tokens": "^0.3.7"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
removeFromWishlist,
|
|
10
10
|
} from "@pradip1995/commerce-core/client/actions/wishlist"
|
|
11
11
|
import type { HttpTypes } from "@medusajs/types"
|
|
12
|
+
import { isNextRedirect } from "@pradip1995/segment-primitives/is-next-redirect"
|
|
12
13
|
import QuickAddPanel from "./quick-add-panel"
|
|
13
14
|
|
|
14
15
|
type Props = {
|
|
@@ -134,6 +135,7 @@ export default function ProductCardActions({ product, countryCode, wishlistProdu
|
|
|
134
135
|
setShowQuickAdd(false)
|
|
135
136
|
router.refresh()
|
|
136
137
|
} catch (err) {
|
|
138
|
+
if (isNextRedirect(err)) throw err
|
|
137
139
|
const message = err instanceof Error ? err.message : "Could not add to cart"
|
|
138
140
|
setError(message)
|
|
139
141
|
window.dispatchEvent(
|