Code cleanup and add pull up menu for complete student status/study group list

This commit is contained in:
Keannu Christian Bernasol 2023-09-29 17:47:22 +08:00
parent fb8e948dfc
commit 8279665ab9
6 changed files with 98 additions and 86 deletions

View file

@ -1,41 +0,0 @@
import { Callout } from "react-native-maps";
import { LocationType, RawLocationType } from "../../interfaces/Interfaces";
import styles from "../../styles";
import { Text } from "react-native";
// Map popup for user's location
type props = {
location: LocationType;
studying: boolean;
subject?: string;
};
export default function CustomMapCallout(props: props) {
let { location, studying, subject } = props;
if (location && location.latitude && location.longitude) {
if (studying) {
return (
<Callout>
<Text style={styles.text_black_tiny}>
You are here {"\n"}
X: {Math.round(location.longitude) + "\n"}
Z: {Math.round(location.latitude) + "\n"}
Studying: {subject}
</Text>
</Callout>
);
} else {
return (
<Callout>
<Text style={styles.text_black_tiny}>
You are here {"\n"}
X: {Math.round(location.longitude) + "\n"}
Z: {Math.round(location.latitude)}
</Text>
</Callout>
);
}
}
return <></>;
}

View file

@ -13,7 +13,7 @@ type props = {
export default function MapRendererFar(props: props) {
return (
<View>
<>
<Text style={styles.text_white_medium}>
You are too far from USTP {"\n"}
Get closer to use Stud-E
@ -74,6 +74,6 @@ export default function MapRendererFar(props: props) {
<Text style={styles.text_white_small}>
{props.dist}km away from USTP {"\n"}
</Text>
</View>
</>
);
}