import React , { FC , ReactElement , useContext , memo } from 'react' ; import { I18nContext } from '@contexts/i18n' ; import MainLayout from '@layouts/main/MainLayout' ; import Logo from '@layouts/main/Logo' ; import Logout from '@layouts/main/Logout' ; import LanguageSwitcher from '@layouts/main/LanguageSwitcher' ; import Cards from './Cards' ; import { StyledMyApps } from './MyApps.styled' ; interface iProps { dataGetApps : any ; router : any ; } const MyApps = ( { dataGetApps , router } ) : ReactElement => { if ( ! dataGetApps . getApps ) { return < div />; } const { t } = useContext ( I18nContext ) ; return ( < MainLayout title = { t ( 'My Apps' ) } > < StyledMyApps > < div className = "header" > < div className = "logo" > < Logo /> < /div> < /div> < Cards items = { dataGetApps . getApps } router = { router } / > < div className = "flexFooter" > < LanguageSwitcher /> < Logout router = { router } / > < /div> < /StyledMyApps> < /MainLayout>); } ; export default memo ( MyApps ) ;