File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ export interface IProductRootObject {
90
90
* @param {number } variationId // Variation ID
91
91
* @param {boolean } fullWidth // Whether the button should be full-width
92
92
*/
93
-
94
93
const AddToCart = ( {
95
94
product,
96
95
variationId,
@@ -141,7 +140,6 @@ const AddToCart = ({
141
140
// Refetch cart immediately after adding to cart
142
141
await refetch ( ) ;
143
142
} catch ( error ) {
144
- console . error ( 'Error adding to cart:' , error ) ;
145
143
setRequestError ( true ) ;
146
144
}
147
145
} ;
@@ -155,6 +153,12 @@ const AddToCart = ({
155
153
>
156
154
KJØP
157
155
</ Button >
156
+ { requestError && (
157
+ < p >
158
+ Det oppstod en feil ved tillegging i handlekurven. Vennligst prøv
159
+ igjen.
160
+ </ p >
161
+ ) }
158
162
</ >
159
163
) ;
160
164
} ;
You can’t perform that action at this time.
0 commit comments