Skip to content

Commit 5eeea7d

Browse files
Chris KhanChris Khan
authored andcommitted
feat: disable Swap, LP Rewards, Vaults, and Points pages with simple placeholders
1 parent 2bc3355 commit 5eeea7d

4 files changed

Lines changed: 27 additions & 571 deletions

File tree

pages/lp-rewards.vue

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,13 @@
11
<script setup lang="ts">
2-
import { Status, StatusType } from '@injectivelabs/utils'
3-
4-
const campaignStore = useCampaignStore()
5-
const gridStrategyStore = useGridStrategyStore()
6-
7-
const { $onError } = useNuxtApp()
8-
9-
const round = useQueryRef('round', '')
10-
11-
const status = reactive(new Status(StatusType.Idle))
12-
13-
onWalletConnected(() => {
14-
status.setLoading()
15-
16-
const roundId = round.value ? Number(round.value) : undefined
17-
18-
Promise.all([
19-
campaignStore.fetchRound(roundId),
20-
gridStrategyStore.fetchAllStrategies()
21-
])
22-
.catch($onError)
23-
.finally(() => {
24-
status.setIdle()
25-
})
26-
})
2+
// LP Rewards disabled in this build.
273
</script>
284

295
<template>
30-
<AppHocLoading v-bind="{ status }" is-full-screen>
31-
<div class="mb-40">
32-
<NuxtPage />
6+
<UContainer class="py-16">
7+
<div class="text-center py-24">
8+
<h1 class="text-4xl lg:text-6xl font-bold">LP Rewards Unavailable</h1>
9+
<p class="text-lg mt-4">This feature is not available in this build.</p>
10+
<NuxtLink class="btn btn-primary mt-8" to="/markets">Go to Markets</NuxtLink>
3311
</div>
34-
</AppHocLoading>
12+
</UContainer>
3513
</template>

pages/points.vue

Lines changed: 6 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,12 @@
11
<script lang="ts" setup>
2-
import { Status, StatusType } from '@injectivelabs/utils'
3-
import { PointsPeriod } from '@/types'
4-
5-
const { $onError } = useNuxtApp()
6-
const pointsStore = usePointsStore()
7-
const sharedWalletStore = useSharedWalletStore()
8-
9-
const selectedPeriod = ref(PointsPeriod.Day)
10-
const status = reactive(new Status(StatusType.Loading))
11-
const fetchStatus = reactive(new Status(StatusType.Idle))
12-
13-
function fetchAccountPoints() {
14-
fetchStatus.setLoading()
15-
16-
const action =
17-
selectedPeriod.value === PointsPeriod.Day
18-
? pointsStore.fetchAccountDailyPoints
19-
: pointsStore.fetchAccountWeeklyPoints
20-
21-
action()
22-
.catch($onError)
23-
.finally(() => fetchStatus.setIdle())
24-
}
25-
26-
onWalletConnected(() => {
27-
status.setLoading()
28-
29-
Promise.all([
30-
pointsStore.fetchAccountPointsStat(),
31-
pointsStore.fetchAccountDailyPoints()
32-
])
33-
.catch($onError)
34-
.finally(() => status.setIdle())
35-
})
36-
37-
useIntervalFn(() => {
38-
if (!sharedWalletStore.isUserConnected) {
39-
return
40-
}
41-
42-
return Promise.all([
43-
pointsStore.fetchAccountPointsStat(),
44-
selectedPeriod.value === PointsPeriod.Day
45-
? pointsStore.fetchAccountDailyPoints()
46-
: pointsStore.fetchAccountWeeklyPoints()
47-
])
48-
}, 60 * 1000)
2+
// Points disabled in this build.
493
</script>
504

515
<template>
52-
<div
53-
class="pt-12 pb-32 px-40 max-xs:pt-8 max-xs:px-4 max-xs:pb-16 max-xl:pt-12 max-xl:px-12 max-xl:pb-24 max-3xl:px-40 max-w-[1400px] 5xl:max-w-[90%] mx-auto"
54-
>
55-
<div class="flex flex-col gap-4 max-xs:gap-1">
56-
<h1 class="text-3xl max-xs:text-2xl">{{ $t('points.title') }}</h1>
57-
<p class="text-base tracking-wide max-xs:text-sm">
58-
{{ $t('points.description') }}
59-
</p>
60-
</div>
61-
62-
<PartialsPointsStats />
63-
64-
<div class="flex gap-6 max-lg:flex-col max-lg:items-center">
65-
<USkeleton
66-
v-if="fetchStatus.isLoading()"
67-
class="flex-1 w-full max-lg:basis-52"
68-
/>
69-
<PartialsPointsTable
70-
v-else
71-
v-model="selectedPeriod"
72-
v-bind="{
73-
isDailyPeriod: selectedPeriod === PointsPeriod.Day
74-
}"
75-
@update:model-value="fetchAccountPoints"
76-
/>
77-
78-
<PartialsPointsScoreCard />
6+
<UContainer class="py-16">
7+
<div class="text-center py-24">
8+
<h1 class="text-4xl lg:text-6xl font-bold">Points Unavailable</h1>
9+
<p class="text-lg mt-4">This feature is not available in this build.</p>
7910
</div>
80-
</div>
11+
</UContainer>
8112
</template>

0 commit comments

Comments
 (0)