-
Notifications
You must be signed in to change notification settings - Fork 95
fix: resolve merge conflict artifacts in 4 page files (closes #256) #258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
b7a4d79
9821647
754f054
ead1001
d72ef0d
9731de5
8e4baee
fb711bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,10 +26,6 @@ | |
| const currency = '₹'; | ||
| const delivery_fee = 40; | ||
| //wishlist functions | ||
| const fetchWishlist = async () => { | ||
| try { | ||
| const response = await apiConfig.get('/wishlist'); | ||
| //wishlist functions | ||
| const fetchWishlist = async () => { | ||
| setLoadingWishlist(true); | ||
| setWishlistError(null); | ||
|
|
@@ -41,24 +37,13 @@ | |
| setWishlistError(response.data.message || 'Failed to fetch wishlist'); | ||
| } | ||
| } catch (error) { | ||
| console.log(error); | ||
| setWishlistError(error.response?.data?.message || error.message || 'Failed to fetch wishlist'); | ||
| } finally { | ||
| setLoadingWishlist(false); | ||
| } | ||
| }; | ||
| const addToWishlist = async (productId) => { | ||
| try { | ||
| const response = await apiConfig.post('/wishlist/add', { productId }); | ||
|
|
||
| if (response.data.success) { | ||
| setWishlist(response.data.wishlist); | ||
| } | ||
| } catch (error) { | ||
| // eslint-disable-next-line no-console | ||
| console.error(error); | ||
| } | ||
| }; | ||
| const addToWishlist = async (productId) => { | ||
| try { | ||
| const response = await apiConfig.post('/wishlist/add', { productId }); | ||
|
|
@@ -108,7 +93,7 @@ | |
| } catch (error) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Error fetching products:', error); | ||
| console.log('Error fetching products:', error); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected console statement |
||
| setProductsError(error.response?.data?.message || error.message || 'Failed to load products.'); | ||
| } finally { | ||
| setLoadingProducts(false); | ||
|
|
@@ -156,7 +141,7 @@ | |
| } catch (error) { | ||
| // eslint-disable-next-line no-console | ||
| console.error('Error fetching cart:', error); | ||
| console.log('❌ Error fetching cart:', error); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected console statement |
||
| setCartError(error.response?.data?.message || error.message || 'Failed to load cart.'); | ||
| } finally { | ||
| setLoadingCart(false); | ||
|
|
@@ -252,7 +237,7 @@ | |
|
|
||
| useEffect(() => { | ||
| getProducts(); | ||
| }, []); | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unexpected console statement |
||
| useEffect(() => { | ||
| if (userData) { | ||
| getUserCart(); | ||
|
|
@@ -289,13 +274,10 @@ | |
| removeFromCompare, | ||
| comparePanelOpen, | ||
| toggleComparePanel, | ||
| wishlist, | ||
| wishlist, loadingWishlist, wishlistError, | ||
| addToWishlist, | ||
| fetchWishlist, | ||
| removeFromWishlist, | ||
| setCartItem, UpdateQuantity, getCartAmount, | ||
| compareList, toggleCompare, removeFromCompare, comparePanelOpen, toggleComparePanel, | ||
| wishlist, loadingWishlist, wishlistError, addToWishlist, fetchWishlist, removeFromWishlist | ||
| }; | ||
|
|
||
| return ( | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unexpected console statement