Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/happ-card): update component to new data structure returned by the API #76

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading