Skip to content

Commit

Permalink
JDI Branch Navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
CharlotteLaw committed Oct 20, 2024
2 parents 594fc60 + 79337e2 commit 5e6b3ff
Show file tree
Hide file tree
Showing 19 changed files with 382 additions and 98 deletions.
17 changes: 3 additions & 14 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
import * as React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer } from '@react-navigation/native';
import HealingResources from '@/HealingResources';
import Home from '@/screens/Home';
import LegalRights from '@/screens/LegalRights';
import SeekHelp from '@/screens/SeekHelp';

const Tab = createBottomTabNavigator();
import MainTabNav from '@/navigation/BottomTabNavigator';

export default function App() {
return (
<NavigationContainer independent={true}>
<Tab.Navigator initialRouteName="Home">
<Tab.Screen name="Home" component={Home} />
<Tab.Screen name="Legal Rights" component={LegalRights} />
<Tab.Screen name="Healing Resources" component={HealingResources} />
<Tab.Screen name="Seek Help" component={SeekHelp} />
</Tab.Navigator>
<NavigationContainer>
<MainTabNav />
</NavigationContainer>
);
}
191 changes: 166 additions & 25 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
},
"dependencies": {
"@react-navigation/bottom-tabs": "^6.6.1",
"@react-navigation/material-bottom-tabs": "^6.2.29",
"@react-navigation/native": "^6.1.18",
"@react-navigation/native-stack": "^6.11.0",
"@supabase/supabase-js": "^2.45.4",
"@supabase/supabase-js": "^2.45.6",
"expo": "~51.0.21",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-native": "^0.74.5",
"react-native-paper": "^5.12.5",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1"
"react-native-screens": "3.31.1",
"react-native-vector-icons": "^10.2.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
46 changes: 46 additions & 0 deletions src/navigation/BottomTabNavigator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import * as React from 'react';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import HomeScreen from 'src/screens/Home/';
import HealingResourcesNavigator from './stacks/HealingResourcesNavigator';
import LegalRightsNavigator from './stacks/LegalRightsNavigator';
import SeekHelpNavigator from './stacks/SeekHelpNavigator';
import { BottomTabParamList } from './types';

const initialRouteName = 'Healing';

const Tab = createBottomTabNavigator<BottomTabParamList>();

export default function NavigationBar() {
return (
<Tab.Navigator initialRouteName={initialRouteName}>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarLabel: 'Home',
}}
/>
<Tab.Screen
name="Healing"
component={HealingResourcesNavigator}
options={{
tabBarLabel: 'Healing Resources',
}}
/>
<Tab.Screen
name="Legal"
component={LegalRightsNavigator}
options={{
tabBarLabel: 'Legal Rights',
}}
/>
<Tab.Screen
name="Seek"
component={SeekHelpNavigator}
options={{
tabBarLabel: 'Seek Help',
}}
/>
</Tab.Navigator>
);
}
11 changes: 11 additions & 0 deletions src/navigation/MainNavigator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import BottomTabNavigator from './BottomTabNavigator';

export default function AppNavigator() {
return (
<NavigationContainer>
<BottomTabNavigator />
</NavigationContainer>
);
}
Loading

0 comments on commit 5e6b3ff

Please sign in to comment.