diff --git a/mobile/App.tsx b/mobile/App.tsx index 125fe1b..badfa05 100644 --- a/mobile/App.tsx +++ b/mobile/App.tsx @@ -1,118 +1,48 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * @format - */ -import React from 'react'; -import type {PropsWithChildren} from 'react'; -import { - SafeAreaView, - ScrollView, - StatusBar, - StyleSheet, - Text, - useColorScheme, - View, -} from 'react-native'; +import * as React from 'react'; +import { View, Text, Button } from 'react-native'; +import { NavigationContainer } from '@react-navigation/native'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; +import type { NativeStackScreenProps } from '@react-navigation/native-stack'; -import { - Colors, - DebugInstructions, - Header, - LearnMoreLinks, - ReloadInstructions, -} from 'react-native/Libraries/NewAppScreen'; +type RootStackParamList = { + Home: undefined, + Loby: undefined, + Game: {gameId: string} +}; -type SectionProps = PropsWithChildren<{ - title: string; -}>; +type HomeScreenProps = NativeStackScreenProps; +type LobyScreenProps = NativeStackScreenProps; -function Section({children, title}: SectionProps): React.JSX.Element { - const isDarkMode = useColorScheme() === 'dark'; +function HomeScreen({ navigation, route }: HomeScreenProps) { return ( - - - {title} - - - {children} - + + ); } -function App(): React.JSX.Element { - const isDarkMode = useColorScheme() === 'dark'; - - const backgroundStyle = { - backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, - }; - +function LobyScreen({ navigation, route }: LobyScreenProps) { return ( - - - -
- -
- Edit App.tsx to change this - screen and then come back to see your edits. -
-
- -
-
- -
-
- Read the docs to discover what to do next: -
- -
- - + + Loby Screen + ); } -const styles = StyleSheet.create({ - sectionContainer: { - marginTop: 32, - paddingHorizontal: 24, - }, - sectionTitle: { - fontSize: 24, - fontWeight: '600', - }, - sectionDescription: { - marginTop: 8, - fontSize: 18, - fontWeight: '400', - }, - highlight: { - fontWeight: '700', - }, -}); +const Stack = createNativeStackNavigator(); -export default App; +function App() { + return ( + + + + + + + ); +} + +export default App; \ No newline at end of file