fix: remove some of the logs from the console so its more usable

This commit is contained in:
tonyaellie
2025-05-24 14:20:27 +00:00
parent 83d1ae69a0
commit 1e30dc0005
3 changed files with 28 additions and 9 deletions

View File

@@ -210,8 +210,6 @@
}))
);
console.log(headers.value);
const toggleHeader = (value: string) => {
const header = headers.value.find(h => h.value === value);
if (header) {

View File

@@ -1,21 +1,41 @@
<template>
{{ value }}
<Suspense>
<template #default>
{{ formattedValue }}
</template>
<template #fallback> Loading... </template>
</Suspense>
</template>
<script setup lang="ts">
import { ref, computed } from "vue";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
type Props = {
amount: string | number;
};
const props = defineProps<Props>();
const fmt = await useFormatCurrency();
const fmt = ref(null);
const value = computed(() => {
if (!props.amount || props.amount === "0") {
return fmt(0);
const loadFormatter = async () => {
fmt.value = await useFormatCurrency();
};
loadFormatter();
const formattedValue = computed(() => {
if (!fmt.value) {
return t("global.loading");
}
return fmt(props.amount);
if (!props.amount || props.amount === "0") {
return fmt.value(0);
}
return fmt.value(props.amount);
});
</script>

View File

@@ -156,7 +156,8 @@
"update": "Update",
"value": "Value",
"version": "Version: { version }",
"welcome": "Welcome, { username }"
"welcome": "Welcome, { username }",
"loading": "Loading..."
},
"home": {
"labels": "Labels",