code refactor

This commit is contained in:
MaysWind
2025-01-11 13:59:47 +08:00
parent 61f26e060e
commit 89b233e51b
25 changed files with 128 additions and 128 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { type Ref, ref, computed } from 'vue';
import { ref, computed } from 'vue';
import { defineStore } from 'pinia';
import type { LatestExchangeRate, LatestExchangeRateResponse } from '@/models/exchange_rate.ts';
@@ -32,7 +32,7 @@ function clearExchangeRatesFromLocalStorage(): void {
}
export const useExchangeRatesStore = defineStore('exchangeRates', () => {
const latestExchangeRates: Ref<LatestExchangeRates> = ref(getExchangeRatesFromLocalStorage());
const latestExchangeRates = ref<LatestExchangeRates>(getExchangeRatesFromLocalStorage());
const exchangeRatesLastUpdateTime = computed<number | null>(() => {
const exchangeRates = latestExchangeRates.value || {};