Fixes ACCOUNTS-FRONTEND-JC

This commit is contained in:
ErickSkrauch 2020-07-22 02:25:45 +03:00
parent d25653dd7c
commit 21949c780c

View File

@ -35,7 +35,7 @@ export function setUser(payload: Partial<User>) {
export const CHANGE_LANG = 'USER_CHANGE_LANG'; export const CHANGE_LANG = 'USER_CHANGE_LANG';
export function changeLang(targetLang: string): ThunkAction<Promise<void>> { export function changeLang(targetLang: string): ThunkAction<Promise<void>> {
return async (dispatch, getState) => return (dispatch, getState) =>
dispatch(setLocale(targetLang)).then((lang: string) => { dispatch(setLocale(targetLang)).then((lang: string) => {
const { id, isGuest, lang: oldLang } = getState().user; const { id, isGuest, lang: oldLang } = getState().user;