Skip to content

Commit c347d2e

Browse files
Merge pull request #123 from coding-blocks/buylink_coupon_search_fix
handle invalid coupon code while searching buylink
2 parents 15e0054 + 1aa17a7 commit c347d2e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/BuyLinksView/BuyLinksTable.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ class BuyLinksTable extends React.Component {
6969
totalPages: response.data.pagesInfo.pageCount
7070
})
7171
}).catch((error) => {
72+
let titleText = error.response.data.invalidCoupon ? error.response.data.invalidCoupon
73+
: 'Error while fetching buy links!'
7274
Swal.fire({
7375
type: 'error',
74-
title: 'Error while fetching buy links!',
76+
title: titleText,
7577
text: error
7678
});
7779
this.setState({

0 commit comments

Comments
 (0)