Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaan1013 committed May 16, 2022
2 parents f3f0f57 + ab43216 commit 86bee13
Show file tree
Hide file tree
Showing 33 changed files with 849 additions and 547 deletions.
51 changes: 25 additions & 26 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DarkTheme,
DefaultTheme,
} from "@react-navigation/native";
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { createNativeStackNavigator } from "@react-navigation/native-stack";
import AsyncStorage from "@react-native-async-storage/async-storage";
import { AppearanceProvider } from "react-native-appearance";
Expand Down Expand Up @@ -38,11 +39,7 @@ export default function App() {
try {
const number = await AsyncStorage.getItem("number");
const pass = await AsyncStorage.getItem("password");
if (number !== null && pass !== null) {
setLoggedIn(true);
} else {
setLoggedIn(false);
}
setLoggedIn(number !== null && pass !== null);
} catch {}
};

Expand All @@ -54,27 +51,29 @@ export default function App() {
return null;
} else {
return (
<AppearanceProvider>
<ThemeProvider>
<NavigationContainer
theme={scheme === "dark" ? DarkTheme : DefaultTheme}
>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{loggedIn ? (
<>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Login" component={Login} />
</>
) : (
<>
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Home" component={Home} />
</>
)}
</Stack.Navigator>
</NavigationContainer>
</ThemeProvider>
</AppearanceProvider>
<SafeAreaProvider>
<AppearanceProvider>
<ThemeProvider>
<NavigationContainer
theme={scheme === "dark" ? DarkTheme : DefaultTheme}
>
<Stack.Navigator screenOptions={{ headerShown: false }}>
{loggedIn ? (
<>
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="Login" component={Login} />
</>
) : (
<>
<Stack.Screen name="Login" component={Login} />
<Stack.Screen name="Home" component={Home} />
</>
)}
</Stack.Navigator>
</NavigationContainer>
</ThemeProvider>
</AppearanceProvider>
</SafeAreaProvider>
);
}
}
7 changes: 4 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"expo": {
"name": "TeachAssist",
"slug": "teachassistapp",
"version": "1.0.5",
"version": "1.0.7",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
Expand All @@ -18,7 +18,8 @@
],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "io.github.teachassistapp"
"bundleIdentifier": "io.github.teachassistapp",
"buildNumber": "1"
},
"android": {
"adaptiveIcon": {
Expand All @@ -27,7 +28,7 @@
},
"package": "io.github.teachassistapp",
"permissions": [],
"versionCode": 7
"versionCode": 10
},
"web": {
"favicon": "./assets/favicon.png"
Expand Down
Loading

0 comments on commit 86bee13

Please sign in to comment.