[Refactor] Move to src-ui/views and src-ui/logics structure.
This commit is contained in:
14
src-ui/views/app/_app_controllers/UiLanguageController.jsx
Normal file
14
src-ui/views/app/_app_controllers/UiLanguageController.jsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { useEffect } from "react";
|
||||
|
||||
import { useI18n } from "@useI18n";
|
||||
import { useAppearance } from "@logics_configs";
|
||||
|
||||
export const UiLanguageController = () => {
|
||||
const { currentUiLanguage } = useAppearance();
|
||||
const { i18n } = useI18n();
|
||||
|
||||
useEffect(() => {
|
||||
i18n.changeLanguage(currentUiLanguage.data);
|
||||
}, [currentUiLanguage.data]);
|
||||
return null;
|
||||
};
|
||||
Reference in New Issue
Block a user