Skip to content

Commit

Permalink
fix: deleting duplicated message (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
deov31 authored and libruce committed Dec 27, 2023
1 parent 290fff7 commit 090ce83
Showing 1 changed file with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,24 +92,6 @@ function ShoppingDetailFooter(props: ShoppingDetailFooterProps) {

const cartEntityId = getCookie('cartId')

const getSnackbarMessage = (res: any) => {
if (!res.errors) {
snackbar.success('', {
jsx: successTip({
message: b3Lang('shoppingList.footer.productsAddedToCart'),
link: '/cart.php',
linkText: b3Lang('shoppingList.footer.viewCart'),
isOutLink: true,
}),
isClose: true,
})
} else {
snackbar.error('Error has occurred', {
isClose: true,
})
}
}

const containerStyle = isMobile
? {
alignItems: 'flex-start',
Expand Down Expand Up @@ -274,7 +256,6 @@ function ShoppingDetailFooter(props: ShoppingDetailFooterProps) {
res = await updateCart(cartInfo, lineItems, storePlatform)
} else {
res = await callCart(lineItems, storePlatform)
getSnackbarMessage(res)
b3TriggerCartNumber()
}
if (res && res.errors) {
Expand Down

0 comments on commit 090ce83

Please sign in to comment.