Impove Intl formatting (#5372)
* Improve Intl formatting * Additional fixes * Fixed formatters were not updated on locale change * Fixed formatNumber was not updated on locale change * Additional formatting and fixes after merge * Run prepr:frontend * Remove `'` in icon map * Run `pnpm install` * fix: lint + import * Additional fixes --------- Co-authored-by: Calum H. <calum@modrinth.com> Co-authored-by: Calum H. (IMB11) <contact@cal.engineer>
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
<!-- eslint-disable no-console -->
|
||||
<script setup>
|
||||
import { formatNumber } from '@modrinth/utils'
|
||||
import dayjs from 'dayjs'
|
||||
import { defineAsyncComponent, ref } from 'vue'
|
||||
|
||||
import { useFormatNumber } from '../../composables/index.ts'
|
||||
import Button from '../base/Button.vue'
|
||||
import Checkbox from '../base/Checkbox.vue'
|
||||
|
||||
const VueApexCharts = defineAsyncComponent(() => import('vue3-apexcharts'))
|
||||
const formatNumber = useFormatNumber()
|
||||
|
||||
const props = defineProps({
|
||||
name: {
|
||||
@@ -149,7 +150,7 @@ const chartOptions = ref({
|
||||
!props.hideTotal
|
||||
? `<div class="value">
|
||||
${props.prefix}
|
||||
${formatNumber(series.reduce((a, b) => a + b[dataPointIndex], 0).toString(), false)}
|
||||
${formatNumber(series.reduce((a, b) => a + b[dataPointIndex], 0).toString())}
|
||||
${props.suffix}
|
||||
</div>`
|
||||
: ``
|
||||
@@ -163,7 +164,7 @@ const chartOptions = ref({
|
||||
</div>
|
||||
<div class="value">
|
||||
${props.prefix}
|
||||
${formatNumber(value[dataPointIndex], false)}
|
||||
${formatNumber(value[dataPointIndex])}
|
||||
${props.suffix}
|
||||
</div>
|
||||
</div>`
|
||||
|
||||
Reference in New Issue
Block a user