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 {
9090 * @param {number } variationId // Variation ID
9191 * @param {boolean } fullWidth // Whether the button should be full-width
9292 */
93-
9493const AddToCart = ( {
9594 product,
9695 variationId,
@@ -141,7 +140,6 @@ const AddToCart = ({
141140 // Refetch cart immediately after adding to cart
142141 await refetch ( ) ;
143142 } catch ( error ) {
144- console . error ( 'Error adding to cart:' , error ) ;
145143 setRequestError ( true ) ;
146144 }
147145 } ;
@@ -155,6 +153,12 @@ const AddToCart = ({
155153 >
156154 KJØP
157155 </ Button >
156+ { requestError && (
157+ < p >
158+ Det oppstod en feil ved tillegging i handlekurven. Vennligst prøv
159+ igjen.
160+ </ p >
161+ ) }
158162 </ >
159163 ) ;
160164} ;
You can’t perform that action at this time.
0 commit comments