Skip to content

Commit

Permalink
[wip] build proof of concept bottom tab nav bar, difficult to integra…
Browse files Browse the repository at this point in the history
…te with main page.
  • Loading branch information
ronniebeggs committed Oct 7, 2023
1 parent c35b21e commit f1b6516
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
5 changes: 5 additions & 0 deletions src/app/(BottomTabNavigation)/Cases/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Stack } from 'expo-router';

export default function CasesLayout() {
return <Stack screenOptions={{ headerShown: false }} />;
}
5 changes: 5 additions & 0 deletions src/app/(BottomTabNavigation)/Profile/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Stack } from 'expo-router';

export default function ProfileLayout() {
return <Stack screenOptions={{ headerShown: false }} />;
}
18 changes: 5 additions & 13 deletions src/app/(BottomTabNavigation)/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@ import { Tabs } from 'expo-router/tabs';

export default function AppLayout() {
return (
<Tabs screenOptions={{ headerShown: false }}>
<Tabs initialRouteName="home" screenOptions={{ headerShown: false }}>
<Tabs.Screen
name="Cases"
name="home"
options={{
href: 'Cases/index.tsx',
tabBarLabel: 'Cases',
title: 'Cases',
}}
/>
<Tabs.Screen
name="Profile"
options={{
href: 'Profile/index.tsx',
tabBarLabel: 'Profile',
title: 'Profile',
href: '/home',
tabBarLabel: 'Home',
title: 'Home',
}}
/>
</Tabs>
Expand Down
11 changes: 11 additions & 0 deletions src/app/(BottomTabNavigation)/home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from 'react';
import { Text, View } from 'react-native';
import styles from './Profile/styles';

export default function HomeScreen() {
return (
<View style={styles.container}>
<Text>This is a test home screen!</Text>
</View>
);
}
12 changes: 8 additions & 4 deletions src/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
// import { Stack } from 'expo-router';
import AppLayout from './(BottomTabNavigation)/_layout';
import { Stack } from 'expo-router';
// import AppLayout from './(BottomTabNavigation)/_layout';

export default function StackLayout() {
return <AppLayout />;
// return <Stack screenOptions={{ headerShown: false }} />;
// return <AppLayout />;
return (
<Stack screenOptions={{ headerShown: true }}>
<Stack.Screen name="(BottomTabNavigation)" options={{}} />
</Stack>
);
}

0 comments on commit f1b6516

Please sign in to comment.