diff options
author | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2020-06-25 16:28:00 -0700 |
---|---|---|
committer | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2020-06-25 16:28:00 -0700 |
commit | bc8184b1a402af0c3e54edb79b38ed8e09a6798d (patch) | |
tree | 2ac23485a81086ab4e5df2989e2002c7e67cd56a /src/routes/Routes.tsx | |
parent | 36a6781faad4380e7c401f32506707c0e48a15f5 (diff) |
cleanup file structure, add react-navigation & basic routes
Diffstat (limited to 'src/routes/Routes.tsx')
-rw-r--r-- | src/routes/Routes.tsx | 24 |
1 files changed, 24 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; |