Skip to content

Commit

Permalink
feat: [MP-310] hide incentive banner
Browse files Browse the repository at this point in the history
  • Loading branch information
mlibazisi committed Jun 20, 2024
1 parent 1faa8f0 commit cdf251d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template>
<template v-if="!isLoggedin || !hasPromoBalance">
<generic-promo-banner
class="tw-text-center"
:promo-banner-content="promoBannerContent"
Expand Down Expand Up @@ -27,6 +27,9 @@ const amountToLendQuery = gql`
my {
id
depositIncentiveAmountToLend
userAccount {

Check failure on line 30 in src/components/WwwFrame/PromotionalBanner/Banners/DepositIncentiveBanner.vue

View workflow job for this annotation

GitHub Actions / build

'id' field required on 'userAccount'
promoBalance
}
}
}
`;
Expand All @@ -38,6 +41,7 @@ export default {
},
data() {
return {
hasPromoBalance: false,
amountToLend: 0,
isLoggedin: false,
basketTotal: 0,
Expand All @@ -51,6 +55,7 @@ export default {
this.amountToLend = parseFloat(data?.my?.depositIncentiveAmountToLend) ?? 0;
this.isLoggedin = !!data?.my?.id ?? false;
this.basketTotal = parseFloat(data.shop?.basket?.totals?.loanReservationTotal ?? 0);
this.hasPromoBalance = numeral(data?.my?.userAccount?.promoBalance ?? 0).value() > 0;
},
},
computed: {
Expand Down

0 comments on commit cdf251d

Please sign in to comment.