-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
53 lines (51 loc) · 1.43 KB
/
App.js
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
43
44
45
46
47
48
49
50
51
52
53
import React, { useState } from "react";
import { StyleSheet, SafeAreaView, View, Text } from "react-native";
import { NavigationContainer } from "@react-navigation/native";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { createStackNavigator } from "@react-navigation/stack";
import { NavBar } from "./components/NavBar";
import DeckDetail from "./components/DeckDetail";
import AddCard from "./components/AddCard";
import Quiz from "./components/Quiz";
import { setLocalNotification } from "./utlis/notifications";
export const Tab = createBottomTabNavigator();
const Stack = createStackNavigator();
export default class App extends React.Component {
componentDidMount() {
setLocalNotification();
}
render() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Decks" component={NavBar} />
<Stack.Screen name="Deck" component={DeckDetail} />
<Stack.Screen name="AddCard" component={AddCard} />
<Stack.Screen name="Quiz" component={Quiz} />
</Stack.Navigator>
</NavigationContainer>
);
}
}
export const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
},
horizontal: {
flexDirection: "row",
justifyContent: "space-around",
padding: 10,
},
deckContainer: {
flex: 1,
justifyContent: "center",
alignItems: "center",
padding: 20,
},
deckHeader: {
fontSize: 30,
color: "tomato",
alignItems: "center",
},
});