Skip to content

Commit

Permalink
feat(happ-details): move redirect to HAppsPage
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszRybczonek committed Oct 23, 2023
1 parent 1e6f3d6 commit 1c333c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/hAppDetails/HAppDetailsUsage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const props = defineProps<{
<span class="happ-details-usage__usage-row-value">{{ presentBytes(props.hApp.last7DaysUsage.storage) }}</span> {{ t('$.storage') }}
</div>
<div class="happ-details-usage__usage-row-value-wrapper happ-details-usage__data-transfer">
<span class="happ-details-usage__usage-row-value">{{ presentBytes(props.hApp.last7DaysUsage.bandwidth) }}</span> {{ t('$.bandwidth') }}
<span class="happ-details-usage__usage-row-value">{{ presentBytes(props.hApp.last7DaysUsage.bandwidth) }}</span> {{ t('$.data_transfer') }}
</div>
</div>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/pages/HAppsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SortByDropdown from '@/components/hApps/SortByDropdown.vue'
import PrimaryLayout from '@/components/PrimaryLayout.vue'
import { kSortOptions } from '@/constants/ui'
import type { HApp } from '@/interfaces/HposInterface'
import router, { kRoutes } from '@/router'
import { useDashboardStore } from '@/store/dashboard'
import { isError as isErrorPredicate } from '@/types/predicates'
Expand Down Expand Up @@ -77,6 +78,10 @@ async function getData(): Promise<void> {
isLoading.value = false
}
async function goToDetails(happId: string): Promise<void> {
await router.push({ name: kRoutes.happ.name, params: { id: happId } })
}
onMounted(async () => {
await getData()
})
Expand Down Expand Up @@ -115,7 +120,9 @@ onMounted(async () => {
v-for="hApp in filteredHApps"
:key="hApp.id"
:happ="hApp"
are-details-available
class="happs__happ-list-item"
@details-link-click="goToDetails(hApp.id)"
>
<template #status-chip>
<BaseChip
Expand Down

0 comments on commit 1c333c3

Please sign in to comment.