-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
30 lines (26 loc) · 1.04 KB
/
App.tsx
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
import { NavigationContainer } from '@react-navigation/native';
import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import MainScreen from './src/MainScreen';
import Settings from './src/Settings';
import { SpotifyContextProvider } from './src/SpotifyAPIContext';
import { SafeAreaView } from 'react-native';
import { RootStackParamList } from './src/types/navigationTypes';
const Stack = createNativeStackNavigator<RootStackParamList>();
class App extends React.PureComponent {
render(): React.ReactNode {
return (
<NavigationContainer>
<SafeAreaView style={{ width: "100%", height: "100%" }}>
<SpotifyContextProvider>
<Stack.Navigator screenOptions={{ headerShown: false }}>
<Stack.Screen name="MainScreen" component={MainScreen} />
<Stack.Screen name="Settings" component={Settings} />
</Stack.Navigator>
</SpotifyContextProvider>
</SafeAreaView>
</NavigationContainer >
)
}
}
export default App;