-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
67 lines (53 loc) · 1.81 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
import React from "react";
import { createAppContainer } from "react-navigation";
// Using React Navigation v.4 in line with Udemy tutorial
import { createSwitchNavigator } from "react-navigation";
import { createBottomTabNavigator } from "react-navigation-tabs";
import { createStackNavigator } from "react-navigation-stack";
// import { createDrawerNavigator } from "react-navigation-drawer";
import { Provider as MusicProvider } from "./src/context/MusicContext";
import { Provider as SettingsProvider } from "./src/context/SettingsContext";
import TitleScreen from "./src/screens/TitleScreen";
import ShowTracksScreen from "./src/screens/ShowTracksScreen";
import ViewPlaylistsScreen from "./src/screens/ViewPlaylistsScreen";
import CreatePlaylistScreen from "./src/screens/CreatePlaylistScreen";
import PlayMusicScreen from "./src/screens/PlayMusicScreen";
import SMCScreen from "./src/screens/SMCScreen";
import SettingsScreen from "./src/screens/SettingsScreen";
import { Ionicons } from '@expo/vector-icons';
const musicFlow = createStackNavigator({
ShowTracks: ShowTracksScreen,
ViewPlaylists: ViewPlaylistsScreen,
CreatePlaylist: CreatePlaylistScreen,
PlayMusic: PlayMusicScreen
});
musicFlow.navigationOptions = {
title: "Music",
tabBarIcon: <Ionicons name="musical-notes" size={24} color="black" />
};
const mainMenuTabFlow = createBottomTabNavigator({
musicFlow,
SMC: SMCScreen,
Settings: SettingsScreen
});
// const drawer = createDrawerNavigator({
// });
const switchNavigator = createSwitchNavigator({
Title: TitleScreen,
mainMenuTabFlow
},
{
initialRouteName: "Title",
navigationOptions: {
title: "APP_NAME"
}
}
);
const App = createAppContainer(switchNavigator);
export default () => (
<SettingsProvider>
<MusicProvider>
<App />
</MusicProvider>
</SettingsProvider>
);