This repository has been archived by the owner on Feb 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d3ffcc
commit fa6622b
Showing
11 changed files
with
3,157 additions
and
135 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,13 @@ | ||
import ErrorBoundary from 'Components/common/error-boundary'; | ||
import Layout from 'Components/layout'; | ||
import AuthProvider from 'Contexts/authProvider'; | ||
import { changeLanguage, getInitialLanguage, initializeTranslation } from './translations/i18n'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { SUPPORTED_LANGUAGES } from 'Constants/translations'; | ||
|
||
initializeTranslation(); | ||
|
||
const App = () => { | ||
const { t } = useTranslation(); | ||
return ( | ||
<AuthProvider> | ||
<ErrorBoundary> | ||
<Layout>{t('Welcome to React')}</Layout> | ||
<select className='select' onChange={e => changeLanguage(e.target.value)} value={getInitialLanguage()}> | ||
{Object.entries(SUPPORTED_LANGUAGES).map(([key, value]) => ( | ||
<option key={key} value={key}> | ||
{value} | ||
</option> | ||
))} | ||
</select> | ||
</ErrorBoundary> | ||
</AuthProvider> | ||
); | ||
}; | ||
const App = () => ( | ||
<AuthProvider> | ||
<ErrorBoundary> | ||
<Layout>App</Layout> | ||
</ErrorBoundary> | ||
</AuthProvider> | ||
); | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"Welcome to React": "Welcome to React and react-i18next", | ||
"Click Here": "Click Here" | ||
"Welcome to React": "Welcome to React and react-i18next", | ||
"Click Here": "Click Here" | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.