-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
45 lines (34 loc) · 1.16 KB
/
App.js
File metadata and controls
45 lines (34 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import React, { useEffect, useState } from 'react';
import { Modal, Text, View, StyleSheet, TouchableOpacity} from 'react-native';
import Input from './components/Modal/Input';
import Clock from './components/Clock/Clock';
import Black from './components/Clock/Black/Black';
function App(){
const[gameData, setGameData] = useState([false,0]);
const[chance,setChance] = useState(0);
const[winner,setWinner] = useState(2);
return (
<View style={styles.container}>
<View style={[styles.half,styles.upsideDownView]}>
<Clock gameData={gameData} setGameData={setGameData} bg={"white"} chance={chance} setChance={setChance} setWinner={setWinner}/>
</View>
<Input setGameData={setGameData} winner={winner} setWinner={setWinner}/>
<View style={styles.half}>
<Black gameData={gameData} setGameData={setGameData} bg={"black"} chance={chance} setChance={setChance} setWinner={setWinner}/>
</View>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: 'column',
},
half: {
flex: 1,
},
upsideDownView: {
transform: [{ rotate: '180deg' }],
},
});
export default App;