-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathApp.js
More file actions
79 lines (73 loc) · 2.14 KB
/
Copy pathApp.js
File metadata and controls
79 lines (73 loc) · 2.14 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import React from 'react';
import * as Notifications from 'expo-notifications';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Home from './screens/home.js'
import SelectTime from './screens/SelectTime'
import SelectMood from './screens/SelectMood'
import SelectGenre from './screens/SelectGenre'
// ensures alerts are seen when app is open
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
}),
});
const Stack = createNativeStackNavigator();
function App(){
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="Home">
<Stack.Screen name="Home" component={Home}
options={{
title: 'Home',
headerStyle: {
backgroundColor: '#FB6E6E',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}/>
<Stack.Screen name="SelectTime" component={SelectTime}
options={{
title: 'Select Time',
headerStyle: {
backgroundColor: '#FB6E6E',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen name="SelectMood" component={SelectMood}
options={{
title: 'Select Mood',
headerStyle: {
backgroundColor: '#FB6E6E',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
<Stack.Screen name="SelectGenre" component={SelectGenre}
options={{
title: 'Select Genre',
headerStyle: {
backgroundColor: '#FB6E6E',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;