Skip to content

Commit

Permalink
feat(happ-card): update component to new data structure returned by t…
Browse files Browse the repository at this point in the history
…he API
  • Loading branch information
mateuszRybczonek committed Nov 15, 2023
1 parent 5210576 commit 5695673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
11 changes: 2 additions & 9 deletions src/components/HAppCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@
</slot>
</div>

<div class="happ-card__earnings disabled">
<div class="happ-card__earnings">
{{ $t('$.last_7_days') }}:
<span class="bold">
&nbsp;{{ earnings }} HF
&nbsp{{ formatCurrency(Number(props.happ.earnings.last7Days)) }} HF
</span>
</div>

Expand All @@ -54,7 +54,6 @@
</template>

<script setup>
import { computed } from 'vue'
import { formatCurrency } from '../utils/numbers'
import BaseCard from './BaseCard.vue'
import HAppCardUsage from './HAppCardUsage.vue'
Expand Down Expand Up @@ -84,12 +83,6 @@ const props = defineProps({
})
const emit = defineEmits(['details-link-click'])
const earnings = computed(() =>
props.happ.last7daysEarnings && Number(props.happ.last7daysEarnings)
? formatCurrency(Number(props.happ.last7daysEarnings))
: '--'
)
</script>

<style lang="scss" scoped>
Expand Down
4 changes: 2 additions & 2 deletions src/components/HAppCardUsage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ const items = computed(() => {
{
value: presentMicroSeconds(props.happ.usage?.cpu),
unit: t('$.cpu'),
isDisabled: true
isDisabled: false
},
{
value: presentBytes(props.happ.usage?.bandwidth),
unit: t('$.data_transfer'),
isDisabled: false
},
}
// {
// value: presentBytes(props.happ.storage),
// unit: t('$.storage'),
Expand Down

0 comments on commit 5695673

Please sign in to comment.