homebox/frontend/components/global/Currency.vue
Hayden 6a8a25e3f8
feat: new dashboard implementation (#168)
* wip: charts.js experimental work

* update lock file

* wip: frontend redesign

* wip: more UI fixes for consistency across themes

* cleanup

* improve UI log

* style updates

* fix lint errors
2022-12-29 16:19:15 -09:00

21 lines
352 B
Vue

<template>
{{ value }}
</template>
<script setup lang="ts">
type Props = {
amount: string | number;
};
const props = defineProps<Props>();
const fmt = await useFormatCurrency();
const value = computed(() => {
if (!props.amount || props.amount === "0") {
return fmt(0);
}
return fmt(props.amount);
});
</script>