Skip to content

Commit

Permalink
Migrated Navigation to React Navigation (#210)
Browse files Browse the repository at this point in the history
* Started migrating nav! (#209)

* added general structure for navigation

* fixing error

* changing folder structure

* finished up frontend button routes

* added contexts to app nav

* finished migrating navigation
  • Loading branch information
AlexanderWangY authored Apr 10, 2024
1 parent 7b7b946 commit 949e33a
Show file tree
Hide file tree
Showing 45 changed files with 489 additions and 809 deletions.
28 changes: 21 additions & 7 deletions client/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
import React from "react";
import { StyleSheet, View, Text } from "react-native";
import { StyleSheet, Text } from "react-native";
import { AuthStore } from "./src/services/AuthStore";
import { NavigationContainer } from "@react-navigation/native";
import AppNavigator from "./src/navigation/AppNavigator";
import AuthNavigator from "./src/navigation/AuthNavigator";


const App = () => {
const { initialized, isLoggedin } = AuthStore.useState();

if (!initialized) return <Text>Loading...</Text>;

export default function App() {
return (
<View>
<Text>This Componenet is DEPRECATED.</Text>
<Text>DO NOT TOUCH. THE NEW ENTRY POINT IS AT 'app/index.tsx'</Text>
</View>
<NavigationContainer>
{isLoggedin ? (
<AppNavigator />
) : (
<AuthNavigator />
)}
</NavigationContainer>
);
}
};

const styles = StyleSheet.create({
container: {
Expand All @@ -18,3 +30,5 @@ const styles = StyleSheet.create({
justifyContent: "center",
},
});

export default App;
185 changes: 119 additions & 66 deletions client/package-lock.json

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

Loading

0 comments on commit 949e33a

Please sign in to comment.