mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-29 08:45:46 +08:00
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:
parent
6e63f86805
commit
369a00a0b3
3 changed files with 38 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import styles from "../../styles";
|
||||
import { View, Text } from "react-native";
|
||||
import { View, Text, ActivityIndicator } from "react-native";
|
||||
import { useState } from "react";
|
||||
import {
|
||||
UserInfoReturnType,
|
||||
|
@ -183,7 +183,17 @@ export default function SubjectsPage() {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
if (StudentInfo.isLoading || Subjects.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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue