Skip to content

Commit 77cbdff

Browse files
committed
fix(dashboard): only show banner if maximum effective balance of dashboard is reached
See: BEDS-1462
1 parent 096571b commit 77cbdff

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

frontend/pages/dashboard/[[id]]/index.vue

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import type { HashTabs } from '~/types/hashTabs'
1111
1212
const {
1313
isLoggedIn,
14-
premium_perks,
1514
} = useUserStore()
1615
const showInDevelopment = Boolean(useRuntimeConfig().public.showInDevelopment)
1716
const { t: $t } = useTranslation()
@@ -89,24 +88,10 @@ const {
8988
9089
const {
9190
getProducts,
92-
premiumProducts,
9391
} = useProductsStore()
9492
9593
await useAsyncData('get_products', () => getProducts())
9694
97-
const hasReachedLimit = computed(() => {
98-
const latestEffectiveBalance = overview.value?.balances.effective_latest
99-
const freeProduct = premiumProducts.value['Free']
100-
const effectiveBalanceLimitFreeProduct = freeProduct?.premium_perks.effective_balance_per_dashboard
101-
const effectiveBalancePerDashboard = premium_perks.value?.effective_balance_per_dashboard
102-
|| effectiveBalanceLimitFreeProduct
103-
104-
if (!latestEffectiveBalance || !effectiveBalancePerDashboard) {
105-
return false
106-
}
107-
return isGreaterEquals(latestEffectiveBalance, effectiveBalancePerDashboard)
108-
})
109-
11095
await useAsyncData('user_dashboards', () => refreshDashboards(), { watch: [ isLoggedIn ] })
11196
11297
const { error: validatorOverviewError } = await useAsyncData(
@@ -220,7 +205,7 @@ watch(
220205
<BcPageWrapper>
221206
<template #banner>
222207
<BcNotificationBanner
223-
v-if="hasReachedLimit"
208+
v-if=" overview?.is_above_effective_balance_limit"
224209
:title="$t('dashboard.subsciprion_limit_reached_title')"
225210
>
226211
<BcTranslation

0 commit comments

Comments
 (0)