mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
Addition of Hindi Language
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
import React, { useEffect, useContext, Suspense } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
import AppContext from '../../context/AppContext';
|
||||
import LeftSidebar from '../LeftSidebar/LeftSidebar';
|
||||
@ -7,14 +8,16 @@ import RightSidebar from '../RightSidebar/RightSidebar';
|
||||
import templates from '../../templates';
|
||||
|
||||
const App = () => {
|
||||
const { i18n } = useTranslation();
|
||||
const context = useContext(AppContext);
|
||||
const { state, dispatch } = context;
|
||||
const { theme } = state;
|
||||
const { theme, settings } = state;
|
||||
|
||||
useEffect(() => {
|
||||
i18n.changeLanguage(settings.language);
|
||||
const storedState = JSON.parse(localStorage.getItem('state'));
|
||||
dispatch({ type: 'import_data', payload: storedState });
|
||||
}, [dispatch]);
|
||||
}, [dispatch, i18n, settings.language]);
|
||||
|
||||
return (
|
||||
<Suspense fallback="Loading...">
|
||||
|
||||
Reference in New Issue
Block a user