diff options
| author | Husam Salhab <47015061+hsalhab@users.noreply.github.com> | 2020-06-26 12:53:50 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-26 12:53:50 -0400 |
| commit | cdbf153a09e20b3483926bf2cd80d600105fbeae (patch) | |
| tree | 48cc1d99384455af3e8a4c688ca42666c47e1a8f /src/routes | |
| parent | 36a6781faad4380e7c401f32506707c0e48a15f5 (diff) | |
| parent | 69bc5a72f72e847f42d8486ad29161f1e21239d3 (diff) | |
Merge pull request #7 from leonyjiang/tma58-react-navigation-setup
[TMA-58] Cleanup file structure & add react-navigation
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/Routes.tsx | 24 | ||||
| -rw-r--r-- | src/routes/index.ts | 2 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/routes/Routes.tsx b/src/routes/Routes.tsx new file mode 100644 index 00000000..9c2efada --- /dev/null +++ b/src/routes/Routes.tsx @@ -0,0 +1,24 @@ +import React from 'react'; +import {createStackNavigator} from '@react-navigation/stack'; + +import {Login, Registration} from '../screens'; + +export type RootStackParams = { + Login: undefined; + Registration: undefined; +}; + +const RootStack = createStackNavigator<RootStackParamList>(); + +interface RoutesProps {} + +const Routes: React.FC<RoutesProps> = ({}) => { + return ( + <RootStack.Navigator initialRouteName="Login"> + <RootStack.Screen name="Login" component={Login} /> + <RootStack.Screen name="Registration" component={Registration} /> + </RootStack.Navigator> + ); +}; + +export default Routes; diff --git a/src/routes/index.ts b/src/routes/index.ts new file mode 100644 index 00000000..cfa05fcb --- /dev/null +++ b/src/routes/index.ts @@ -0,0 +1,2 @@ +export {default} from './Routes'; +export * from './Routes'; |
