mancala/mobile/src/screens/HomeScreen.tsx

20 lines
809 B
TypeScript
Raw Normal View History

2024-03-24 14:23:08 +03:00
import * as React from 'react';
2024-03-31 16:39:39 +03:00
import { View, Button, Pressable, Text } from 'react-native';
2024-03-24 14:23:08 +03:00
import { useTranslation } from 'react-i18next';
import { HomeScreenProps } from '../types';
2024-03-31 16:39:39 +03:00
import CircularPanel from '../components/CircularPanel';
2024-03-24 14:23:08 +03:00
export function HomeScreen({ navigation, route }: HomeScreenProps) {
const { context } = route.params;
2024-03-24 14:23:08 +03:00
const { t } = useTranslation();
return (
2024-03-31 16:39:39 +03:00
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: context.themeManager.theme?.background }}>
<Pressable onPress={() => navigation.replace('Loby', { context })}>
<CircularPanel color={context.themeManager.theme?.boardColor} children={<Text style={{color: context.themeManager.theme.textColor}}>{t('NewGame')}</Text>}/>
</Pressable>
2024-03-24 14:23:08 +03:00
</View>
);
}