Skip to content

Commit 06683c2

Browse files
get currentLocale from TranslationStore
1 parent 25e254d commit 06683c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/libs/actions/Welcome/OnboardingFlow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import type {NavigationState, PartialState} from '@react-navigation/native';
33
import Onyx from 'react-native-onyx';
44
import type {ValueOf} from 'type-fest';
55
import {translate} from '@libs/Localize';
6-
import BaseLocaleListener from '@libs/Localize/LocaleListener/BaseLocaleListener';
76
import getAdaptedStateFromPath from '@libs/Navigation/helpers/getAdaptedStateFromPath';
87
import {linkingConfig} from '@libs/Navigation/linkingConfig';
98
import {navigationRef} from '@libs/Navigation/Navigation';
109
import type {RootNavigatorParamList} from '@libs/Navigation/types';
1110
import type {Video} from '@userActions/Report';
1211
import CONST from '@src/CONST';
12+
import TranslationStore from '@src/languages/TranslationStore';
1313
import NAVIGATORS from '@src/NAVIGATORS';
1414
import ONYXKEYS from '@src/ONYXKEYS';
1515
import ROUTES from '@src/ROUTES';
@@ -142,7 +142,7 @@ function getOnboardingInitialPath(getOnboardingInitialPathParams: GetOnboardingI
142142
}
143143

144144
const getOnboardingMessages = (locale?: Locale) => {
145-
const resolvedLocale = locale ?? BaseLocaleListener.getPreferredLocale();
145+
const resolvedLocale = locale ?? TranslationStore.getCurrentLocale();
146146
const testDrive = {
147147
ONBOARDING_TASK_NAME: translate(resolvedLocale, 'onboarding.testDrive.name', {}),
148148
EMBEDDED_DEMO_WHITELIST: ['http://', 'https://', 'about:'] as string[],

0 commit comments

Comments
 (0)