diff options
Diffstat (limited to 'src/screens')
-rw-r--r-- | src/screens/Home.tsx | 17 | ||||
-rw-r--r-- | src/screens/Menu.tsx | 19 | ||||
-rw-r--r-- | src/screens/NotFound.tsx | 27 | ||||
-rw-r--r-- | src/screens/Notifications.tsx | 21 | ||||
-rw-r--r-- | src/screens/Profile.tsx | 7 | ||||
-rw-r--r-- | src/screens/Search.tsx | 19 |
6 files changed, 110 insertions, 0 deletions
diff --git a/src/screens/Home.tsx b/src/screens/Home.tsx new file mode 100644 index 000000000..f4b8ffb63 --- /dev/null +++ b/src/screens/Home.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import {Text, Button, View, SafeAreaView} from 'react-native' +import type {PrimaryTabScreenProps} from '../routes/types' + +export const Home = ({navigation}: PrimaryTabScreenProps<'Home'>) => { + return ( + <SafeAreaView style={{flex: 1}}> + <View style={{flex: 1}}> + <Text>Hello world</Text> + <Button + title="Go to Jane's profile" + onPress={() => navigation.navigate('Profile', {name: 'Jane'})} + /> + </View> + </SafeAreaView> + ) +} diff --git a/src/screens/Menu.tsx b/src/screens/Menu.tsx new file mode 100644 index 000000000..2e0376a49 --- /dev/null +++ b/src/screens/Menu.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import {SafeAreaView, ScrollView, Text, Button, View} from 'react-native' +import type {PrimaryTabScreenProps} from '../routes/types' + +export const Menu = ({navigation}: PrimaryTabScreenProps<'Menu'>) => { + return ( + <SafeAreaView> + <ScrollView contentInsetAdjustmentBehavior="automatic"> + <View> + <Text>Hello world</Text> + <Button + title="Go to Jane's profile" + onPress={() => navigation.navigate('Profile', {name: 'Jane'})} + /> + </View> + </ScrollView> + </SafeAreaView> + ) +} diff --git a/src/screens/NotFound.tsx b/src/screens/NotFound.tsx new file mode 100644 index 000000000..afb91b402 --- /dev/null +++ b/src/screens/NotFound.tsx @@ -0,0 +1,27 @@ +import React from 'react' +import { + SafeAreaView, + ScrollView, + StatusBar, + Text, + Button, + useColorScheme, + View, +} from 'react-native' +import type {RootStackScreenProps} from '../routes/types' + +export const NotFound = ({navigation}: RootStackScreenProps<'NotFound'>) => { + const isDarkMode = useColorScheme() === 'dark' + + return ( + <SafeAreaView> + <StatusBar barStyle={isDarkMode ? 'light-content' : 'dark-content'} /> + <ScrollView contentInsetAdjustmentBehavior="automatic"> + <View> + <Text>Page not found</Text> + <Button title="Home" onPress={() => navigation.navigate('Primary')} /> + </View> + </ScrollView> + </SafeAreaView> + ) +} diff --git a/src/screens/Notifications.tsx b/src/screens/Notifications.tsx new file mode 100644 index 000000000..8ffb5bb87 --- /dev/null +++ b/src/screens/Notifications.tsx @@ -0,0 +1,21 @@ +import React from 'react' +import {SafeAreaView, ScrollView, Text, Button, View} from 'react-native' +import type {PrimaryTabScreenProps} from '../routes/types' + +export const Notifications = ({ + navigation, +}: PrimaryTabScreenProps<'Notifications'>) => { + return ( + <SafeAreaView> + <ScrollView contentInsetAdjustmentBehavior="automatic"> + <View> + <Text>Hello world</Text> + <Button + title="Go to Jane's profile" + onPress={() => navigation.navigate('Profile', {name: 'Jane'})} + /> + </View> + </ScrollView> + </SafeAreaView> + ) +} diff --git a/src/screens/Profile.tsx b/src/screens/Profile.tsx new file mode 100644 index 000000000..ffd30a499 --- /dev/null +++ b/src/screens/Profile.tsx @@ -0,0 +1,7 @@ +import React from 'react' +import {Text} from 'react-native' +import type {RootStackScreenProps} from '../routes/types' + +export const Profile = ({route}: RootStackScreenProps<'Profile'>) => { + return <Text>This is {route.params.name}'s profile</Text> +} diff --git a/src/screens/Search.tsx b/src/screens/Search.tsx new file mode 100644 index 000000000..85943190a --- /dev/null +++ b/src/screens/Search.tsx @@ -0,0 +1,19 @@ +import React from 'react' +import {SafeAreaView, ScrollView, Text, Button, View} from 'react-native' +import type {PrimaryTabScreenProps} from '../routes/types' + +export const Search = ({navigation}: PrimaryTabScreenProps<'Search'>) => { + return ( + <SafeAreaView> + <ScrollView contentInsetAdjustmentBehavior="automatic"> + <View> + <Text>Hello world</Text> + <Button + title="Go to Jane's profile" + onPress={() => navigation.navigate('Profile', {name: 'Jane'})} + /> + </View> + </ScrollView> + </SafeAreaView> + ) +} |