-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
51 lines (48 loc) · 1.59 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { RootStackParamList } from './frontend/src/components/types';
import HomePage from './frontend/src/components/HomePage';
import Game from './frontend/src/components/Game';
import Login from './frontend/src/components/LoginPage';
import ProfilePage from './frontend/src/components/ProfilePage';
import Multiplayer from './frontend/src/components/Multiplayer';
import { NativeWindStyleSheet } from 'nativewind';
import { UserProvider } from './frontend/src/components/ContextProvider';
import moment from 'moment';
NativeWindStyleSheet.setOutput({
default: 'native',
});
const Stack =
createNativeStackNavigator<RootStackParamList>();
export default function App() {
const currentDate = moment(new Date()).format(
'MMM Do YYYY'
);
return (
<>
<UserProvider>
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="HomePage"
component={HomePage}
options={{
title: `Music Clash - ${currentDate}`,
}}
/>
<Stack.Screen name="Game" component={Game} />
<Stack.Screen name="Login" component={Login} />
<Stack.Screen
name="ProfilePage"
component={ProfilePage}
/>
<Stack.Screen
name="Multiplayer"
component={Multiplayer}
/>
</Stack.Navigator>
</NavigationContainer>
</UserProvider>
</>
);
}