11import { Fragment } from 'react' ;
22
3- import { useLocale } from 'hooks/useLocale/useLocale ' ;
3+ import { AppRoute } from 'routing/AppRoute.enum ' ;
44import { AppLocale } from 'context/locale/AppLocale.enum' ;
5- import { AppMessages } from 'i18n/messages' ;
6- import { LocationInfo } from 'ui/locationInfo/LocationInfo' ;
5+ import { useLocale } from 'hooks/useLocale/useLocale' ;
76import { useAuth } from 'hooks/useAuth/useAuth' ;
8- import { useUsers } from '../../hooks/useUsers/useUsers' ;
9- import { AppRoute } from 'routing/AppRoute.enum' ;
7+ import { useUsers } from 'hooks/useUsers/useUsers' ;
108import { useNavigate } from 'hooks/useNavigate/useNavigate' ;
9+ import { Translation } from 'ui/translation/Translation' ;
10+ import { LocationInfo } from 'ui/locationInfo/LocationInfo' ;
1111
1212export const Home = ( ) => {
13- const { formatMessage , locale, setLocale } = useLocale ( ) ;
13+ const { locale, setLocale } = useLocale ( ) ;
1414 const { user, login, logout, isAuthenticated, isAuthenticating } = useAuth ( ) ;
1515
1616 const {
@@ -28,13 +28,12 @@ export const Home = () => {
2828 < >
2929 < h2 > Home</ h2 >
3030 < p >
31- { formatMessage ( { id : AppMessages [ ' home.helloWorld' ] } ) }
31+ < Translation id = " home.helloWorld" />
3232 < span style = { { margin : '0 1rem' } } > ←</ span >
33- This text is translated using{ ' ' }
34- < a href = "https://github.com/formatjs/react-intl/blob/master/docs/API.md#formatmessage" >
35- < code > formatMessage</ code >
36- </ a > { ' ' }
37- function from < a href = "https://github.com/formatjs/react-intl" > react-intl</ a > . Click{ ' ' }
33+ < span >
34+ This text is translated using < strong > Translation</ strong > component.
35+ </ span >
36+ < span > Click </ span >
3837 < button
3938 style = { { fontSize : 'inherit' } }
4039 onClick = { ( ) => setLocale ( locale === AppLocale . pl ? AppLocale . en : AppLocale . pl ) }
0 commit comments