From 2a3d5dfe5346aea644ed5429e5fe07f91f9c5d33 Mon Sep 17 00:00:00 2001 From: Demian Holderegger Date: Tue, 14 Jun 2022 21:05:55 +0200 Subject: [PATCH] Add Warning if English is selected #94 --- src/components/infos/InfosList.tsx | 34 ++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/components/infos/InfosList.tsx b/src/components/infos/InfosList.tsx index 9898ea3..63a1413 100644 --- a/src/components/infos/InfosList.tsx +++ b/src/components/infos/InfosList.tsx @@ -11,6 +11,7 @@ import LanguageSwitcher from './LanguageSwitcher'; import {useIsFocused} from '@react-navigation/native'; import MovaSearchbarHeading from '../generic/MovaSearchbarHeading'; import MovaLoading from "../generic/MovaLoading"; +import languageManager from '../../helpers/LanguageManager'; const MainContainer = styled.SafeAreaView` background-color: #fff; @@ -25,6 +26,11 @@ const InfosHeader = styled.View` height: 78px; `; +const EnglishWarning = styled.View` + padding: 10px; + background: black; +`; + type NavigationProp = StackNavigationProp<{infopage: {page: IPage}}, 'infopage'>; function mainPageFilter(page: IPage): boolean { @@ -96,15 +102,25 @@ export default function InfosList({navigation}: {navigation: NavigationProp}) { )} keyExtractor={item => String(item.id)} ListHeaderComponent={ - - - + <> + + + + { languageManager.currentLanguage === 'en' ? + + + Not all information is available in English. Change the language to see everything. + + + : null + } + } ListFooterComponent={} refreshControl={}