mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-18 08:44:25 +08:00
fix circular dependency problem
This commit is contained in:
@@ -241,7 +241,7 @@ export function getRtlLocales(): Record<string, boolean> {
|
||||
|
||||
const languageInfo = ALL_LANGUAGES[languageKey];
|
||||
|
||||
if (languageInfo.textDirection === TextDirection.RTL) {
|
||||
if (languageInfo.textDirection === 'rtl') {
|
||||
rtlLocales[languageKey] = true;
|
||||
}
|
||||
}
|
||||
@@ -750,7 +750,12 @@ export function useI18n() {
|
||||
|
||||
function getCurrentLanguageTextDirection(): TextDirection {
|
||||
const currentLanguageInfo = getCurrentLanguageInfo();
|
||||
return currentLanguageInfo.textDirection;
|
||||
|
||||
if (currentLanguageInfo.textDirection === 'rtl') {
|
||||
return TextDirection.RTL;
|
||||
} else {
|
||||
return TextDirection.LTR;
|
||||
}
|
||||
}
|
||||
|
||||
function getDefaultCurrency(): string {
|
||||
|
||||
Reference in New Issue
Block a user