-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.tsx
More file actions
34 lines (29 loc) · 824 Bytes
/
App.tsx
File metadata and controls
34 lines (29 loc) · 824 Bytes
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
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
*/
import React, {useState} from 'react';
import {SafeAreaView, StyleSheet} from 'react-native';
import {MultipleChoice} from './components/MultipleChoice/MultipleChoice';
import {MatchCorrectAnswer} from './components/MatchCorrectAnswer';
function App(): React.JSX.Element {
const [questionsCount, setQuestionsCount] = useState(1);
return (
<SafeAreaView style={styles.container}>
{questionsCount % 5 !== 0 ? (
<MultipleChoice setQuestionsCount={setQuestionsCount} />
) : (
<MatchCorrectAnswer setQuestionsCount={setQuestionsCount} />
)}
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
},
});
export default App;