-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from calblueprint/charlottelaw/jdi-10-home-page…
…-navigation App Routing
- Loading branch information
Showing
7 changed files
with
86 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import { StatusBar } from 'expo-status-bar'; | ||
import Logo from '@/components/Logo'; | ||
import * as React from 'react'; | ||
import { NavigationContainer } from '@react-navigation/native'; | ||
import { createNativeStackNavigator } from '@react-navigation/native-stack'; | ||
import HealingResources from '@/HealingResources'; | ||
import Home from '@/Home'; | ||
import LegalRights from '@/LegalRights'; | ||
import SeekHelp from '@/SeekHelp'; | ||
|
||
const Stack = createNativeStackNavigator(); | ||
|
||
export default function App() { | ||
return ( | ||
<View style={styles.container}> | ||
<Logo /> | ||
<Text>Open up App.tsx to start working on your app!</Text> | ||
<StatusBar style="auto" /> | ||
</View> | ||
<NavigationContainer independent={true}> | ||
<Stack.Navigator initialRouteName="Home"> | ||
<Stack.Screen name="Home" component={Home} /> | ||
<Stack.Screen name="Healing Resources" component={HealingResources} /> | ||
<Stack.Screen name="Legal Rights" component={LegalRights} /> | ||
<Stack.Screen name="Seek Help" component={SeekHelp} /> | ||
</Stack.Navigator> | ||
</NavigationContainer> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: '#fff', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Text } from 'react-native'; | ||
|
||
export default function HealingResources() { | ||
return <Text>hello</Text>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Button, Text, View } from 'react-native'; | ||
|
||
export default function Home({ navigation }) { | ||
return ( | ||
<View> | ||
<Text>hello</Text> | ||
<Button | ||
title="Healing Resources" | ||
onPress={() => navigation.navigate('Healing Resources')} | ||
/> | ||
<Button | ||
title="Legal Rights" | ||
onPress={() => navigation.navigate('Legal Rights')} | ||
/> | ||
<Button | ||
title="Seek Help" | ||
onPress={() => navigation.navigate('Seek Help')} | ||
/> | ||
</View> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Text } from 'react-native'; | ||
|
||
export default function LegalRights() { | ||
return <Text>LEGAL RIGHTS!!</Text>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Text } from 'react-native'; | ||
|
||
export default function SeekHelp() { | ||
return <Text>SEEK HELP!</Text>; | ||
} |