You've already forked AstralRinth
forked from didirus/AstralRinth
Add TailwindCSS (#1252)
* Setup TailwindCSS * Fully setup configuration * Refactor some tailwind variables
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
import { createFormatter, type Formatter } from '@vintl/compact-number'
|
||||
import type { IntlController } from '@vintl/vintl/controller'
|
||||
import { createFormatter, type Formatter } from "@vintl/compact-number";
|
||||
import type { IntlController } from "@vintl/vintl/controller";
|
||||
|
||||
const formatters = new WeakMap<IntlController<any>, Formatter>()
|
||||
const formatters = new WeakMap<IntlController<any>, Formatter>();
|
||||
|
||||
export function useCompactNumber(): Formatter {
|
||||
const vintl = useVIntl()
|
||||
const vintl = useVIntl();
|
||||
|
||||
let formatter = formatters.get(vintl)
|
||||
let formatter = formatters.get(vintl);
|
||||
|
||||
if (formatter == null) {
|
||||
const formatterRef = computed(() => createFormatter(vintl.intl))
|
||||
formatter = (value, options) => formatterRef.value(value, options)
|
||||
formatters.set(vintl, formatter)
|
||||
const formatterRef = computed(() => createFormatter(vintl.intl));
|
||||
formatter = (value, options) => formatterRef.value(value, options);
|
||||
formatters.set(vintl, formatter);
|
||||
}
|
||||
|
||||
return formatter
|
||||
return formatter;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user