mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2024-11-17 06:19:25 +08:00
Move conditional statements in homepage
This commit is contained in:
parent
a11ff2ee6f
commit
22820e139e
1 changed files with 17 additions and 16 deletions
|
@ -363,6 +363,18 @@ export default function Home() {
|
|||
});
|
||||
|
||||
function CustomMap() {
|
||||
if (!locationPermitted) {
|
||||
console.log(locationPermitted);
|
||||
return (
|
||||
<>
|
||||
<Text style={styles.text_white_medium}>{feedback}</Text>
|
||||
<Button onPress={async () => await requestLocation()}>
|
||||
<Text style={styles.text_white_medium}>Allow Access</Text>
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
} else if (dist && location && locationFetched) {
|
||||
if (dist <= 1 || map_distance_override) {
|
||||
if (
|
||||
(StudentStatusQuery.isFetching && studying) ||
|
||||
StudentStatusListQuery.isFetching ||
|
||||
|
@ -378,18 +390,7 @@ export default function Home() {
|
|||
<Text style={styles.text_white_medium}>Loading...</Text>
|
||||
</>
|
||||
);
|
||||
} else if (!locationPermitted) {
|
||||
console.log(locationPermitted);
|
||||
return (
|
||||
<>
|
||||
<Text style={styles.text_white_medium}>{feedback}</Text>
|
||||
<Button onPress={async () => await requestLocation()}>
|
||||
<Text style={styles.text_white_medium}>Allow Access</Text>
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
} else if (dist && location && locationFetched) {
|
||||
if (dist <= 1 || map_distance_override) {
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<View style={{ alignSelf: "flex-end" }}>
|
||||
|
|
Loading…
Reference in a new issue