Skip to content

Commit

Permalink
set up basic nav w expo router
Browse files Browse the repository at this point in the history
  • Loading branch information
stephaniewong2 committed Oct 4, 2023
1 parent f9e3b8c commit 5c68492
Show file tree
Hide file tree
Showing 26 changed files with 829 additions and 101 deletions.
46 changes: 23 additions & 23 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import React from 'react';
import WelcomeScreen from './src/screens/Authentication/Welcome/Welcome';
import CasesScreen from './src/screens/Cases/Cases';
import ProfileScreen from './src/screens/Profile/Profile';
import QRCodeScannerScreen from './src/screens/QRCodeScanner/QRCodeScanner';
import UpdatesScreen from './src/screens/Updates/Updates';
import { RootStackParamList } from './src/types/types';
// import { NavigationContainer } from '@react-navigation/native';
// import { createNativeStackNavigator } from '@react-navigation/native-stack';
// import React from 'react';
// import WelcomeScreen from './src/screens/Authentication/Welcome/Welcome';
// import CasesScreen from './src/screens/Cases/Cases';
// import ProfileScreen from './src/screens/Profile/Profile';
// import QRCodeScannerScreen from './src/screens/QRCodeScanner/QRCodeScanner';
// import UpdatesScreen from './src/screens/Updates/Updates';
// import { RootStackParamList } from './src/types/types';

export default function App() {
const Stack = createNativeStackNavigator<RootStackParamList>();
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen name="Cases" component={CasesScreen} />
<Stack.Screen name="Welcome" component={WelcomeScreen} />
<Stack.Screen name="QRCodeScanner" component={QRCodeScannerScreen} />
<Stack.Screen name="Updates" component={UpdatesScreen} />
<Stack.Screen name="Profile" component={ProfileScreen} />
</Stack.Navigator>
</NavigationContainer>
);
}
// export default function App() {
// const Stack = createNativeStackNavigator<RootStackParamList>();
// return (
// <NavigationContainer>
// <Stack.Navigator>
// <Stack.Screen name="Cases" component={CasesScreen} />
// <Stack.Screen name="Welcome" component={WelcomeScreen} />
// <Stack.Screen name="QRCodeScanner" component={QRCodeScannerScreen} />
// <Stack.Screen name="Updates" component={UpdatesScreen} />
// <Stack.Screen name="Profile" component={ProfileScreen} />
// </Stack.Navigator>
// </NavigationContainer>
// );
// }
4 changes: 3 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
},
"web": {
"favicon": "./assets/favicon.png"
}
},
"plugins": ["expo-router"],
"scheme": "your-app-scheme"
}
}
1 change: 1 addition & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ module.exports = api => {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: ['expo-router/babel'],
};
};
Loading

0 comments on commit 5c68492

Please sign in to comment.