Added loading pages inidcators to subject and user info page and redirect login page to homepage if user is already logged in

This commit is contained in:
Keannu Christian Bernasol 2023-10-11 19:48:19 +08:00
parent 6e63f86805
commit 369a00a0b3
3 changed files with 38 additions and 5 deletions

View file

@ -7,6 +7,7 @@ import {
NativeSyntheticEvent,
TextInputChangeEventData,
Pressable,
ActivityIndicator,
} from "react-native";
import { useState } from "react";
import {
@ -285,7 +286,22 @@ export default function UserInfoPage() {
);
}
}
if (
StudentInfo.isLoading ||
Semesters.isLoading ||
yearlevel_query.isLoading ||
course_query.isLoading
) {
return (
<View style={styles.background}>
<AnimatedContainerNoScroll>
<View style={{ paddingVertical: 8 }} />
<ActivityIndicator size={96} color={colors.secondary_1} />
<Text style={styles.text_white_medium}>Loading...</Text>
</AnimatedContainerNoScroll>
</View>
);
}
return (
<View style={styles.background}>
<AnimatedContainerNoScroll>