mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat(server): ability to assign the base currency as api query when getting latest ex. rate
This commit is contained in:
@@ -20,13 +20,16 @@ function AutoExchangeRateProvider({ children }: AutoExchangeRateProviderProps) {
|
||||
|
||||
// Retrieves the exchange rate.
|
||||
const { data: autoExchangeRate, isLoading: isAutoExchangeRateLoading } =
|
||||
useLatestExchangeRate(autoExRateCurrency, {
|
||||
enabled: Boolean(autoExRateCurrency),
|
||||
refetchOnWindowFocus: false,
|
||||
staleTime: 0,
|
||||
cacheTime: 0,
|
||||
retry: 0,
|
||||
});
|
||||
useLatestExchangeRate(
|
||||
{ fromCurrency: autoExRateCurrency },
|
||||
{
|
||||
enabled: Boolean(autoExRateCurrency),
|
||||
refetchOnWindowFocus: false,
|
||||
staleTime: 0,
|
||||
cacheTime: 0,
|
||||
retry: 0,
|
||||
},
|
||||
);
|
||||
|
||||
const value = {
|
||||
autoExRateCurrency,
|
||||
|
||||
Reference in New Issue
Block a user