Commit 5828225f authored by Neranga K.T.'s avatar Neranga K.T.

.

parent 258b7494
......@@ -64,7 +64,7 @@ const styles = StyleSheet.create({
title: {
color: 'white',
fontFamily: 'open-sans-bold',
fontSize: 18,
fontSize: 22,
textAlign: 'center',
},
titleContainer: {
......
export default {
elementry: 5,
medium: 5,
elementry: 1,
medium: 1,
advance: 3
}
\ No newline at end of file
export default api = 'http://192.168.231.95:5000/'
\ No newline at end of file
export default api = 'http://192.168.8.170:5000'
\ No newline at end of file
......@@ -91,7 +91,7 @@ const GameLevel = ({navigation}) => {
style={styles.image}>
{/* <Text style={styles.title}>Play Memo</Text> */}
<View style={styles.titleContainer}>
<Text style={styles.title} numberOfLines={1}>Play Memo</Text>
<Text style={styles.title} numberOfLines={1}> Memo</Text>
</View>
</ImageBackground>
</View>
......
import React, { useState, useEffect} from 'react';
import {View, Text, StyleSheet, Button, Image} from 'react-native';
import React, { useState, useEffect, useLayoutEffect} from 'react';
import {View, Text, StyleSheet, Button, Image, } from 'react-native';
import Colors from '../../constants/Colors';
import { useDispatch, useSelector } from 'react-redux';
import * as memoryActions from '../../store/actions/memory';
import endpoint from '../../constants/endpoint';
import {HeaderButtons, Item} from 'react-navigation-header-buttons';
import HeaderButton from '../../component/UI/HeaderButton';
const GameOverScreen = ({navigation}) => {
......@@ -17,6 +19,22 @@ const GameOverScreen = ({navigation}) => {
console.log(passedTime);
console.log(passedLevel);
useLayoutEffect(()=>{
navigation.setOptions({
headerRight: ()=>(
<HeaderButtons
HeaderButtonComponent={HeaderButton}
>
<Item
title='Flag'
iconName='flag'
onPress={()=>{navigation.navigate('MemoryResult')}}
/>
</HeaderButtons>
)
});
},[navigation]);
let totalTime = 0;
for (const key in passedTime){
......
import React from 'react';
import {View, Text, StyleSheet} from 'react-native';
// import React from 'react';
// import {View, Text, StyleSheet} from 'react-native';
const MemoryResult = () => {
return(
<View style={styles.screen}>
// const MemoryResult = () => {
// return(
// <View style={styles.screen}>
</View>
);
// </View>
// );
// }
// const styles = StyleSheet.create({
// screen: {
// flex: 1,
// padding: 10
// }
// });
// export default MemoryResult;
import React, {useEffect, useState} from 'react';
import {
StyleSheet,
View,
Text,
Pressable,
ImageBackground,
TouchableOpacity,
Image,
ScrollView,
StatusBar,
} from 'react-native';
import {SafeAreaView} from 'react-native-safe-area-context';
import Orientation from 'react-native-orientation-locker';
import {useNavigation} from '@react-navigation/native';
// import BackButton from '../../../component/BackButton';
import TableList from '../../component/reading/TableList';
import { ImagePaths } from '../../assets/read/data/ReadData';
export default function ReadResults() {
const navigation = useNavigation();
React.useEffect(() => {
StatusBar.setHidden(true);
// getColorResult();
const unsubscribe = navigation.addListener('focus', () => {
// The screen is focused
// Call any action
Orientation.unlockAllOrientations();
Orientation.lockToPortrait();
});
return unsubscribe;
}, [navigation]);
return (
// <SafeAreaView>
// <ScrollView>
// <View style={{flexDirection: 'column'}}>
// <ImageBackground
// style={styles.image}
// source={ImagePaths.backgroundBasic}>
// {/* <View><BackButton path="Color" /></View> */}
// {/* <View style={styles.container}>
// <Image
// style={styles.logo}
// source={require('../../../assets/result/title.png')}
// />
// </View> */}
// <View style={styles.imageContainer}>{/* <TableList /> */}</View>
// </ImageBackground>
// </View>
// </ScrollView>
// </SafeAreaView>
<SafeAreaView>
<View style={{flexDirection: 'column'}}>
<ImageBackground
style={styles.image}
source={ImagePaths.resultBackground}>
<View style={styles.textBody}>
<Text style={styles.text}>Your Results</Text>
</View>
<View style={styles.imageContainer}>
{/* <View > */}
<TableList />
{/* </View> */}
</View>
<View>
<Image style={styles.temp} source={ImagePaths.chart}></Image>
</View>
</ImageBackground>
</View>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
screen: {
flex: 1,
padding: 10
}
image: {
width: '100%',
height: '100%',
},
container: {
// backgroundColor : '#fff',
marginTop: 30,
justifyContent: 'center',
alignItems: 'center',
},
logo: {
marginTop: 80,
width: '30%',
height: '30%',
},
imageContainer: {
flexDirection: 'row',
marginTop: 1,
},
textBody: {
marginTop: 10,
marginLeft: 90,
// backgroundColor: '#00008B',
width: 220,
borderRadius: 50,
padding: 5,
},
text: {
fontSize: 35,
justifyContent: 'center',
alignItems: 'center',
color: 'black',
borderRadius: 10,
backgroundColor: 'rgba(2, 202, 106, 0.17)',
textAlign: 'center',
fontWeight: 'bold',
},
temp: {
marginTop: 100,
marginLeft: 80,
// backgroundColor: '#00008B',
width: 220,
height: 200,
borderRadius: 50,
padding: 5,
},
});
export default MemoryResult;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment