mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-05-17 03:48:06 +08:00
Code cleanup and add pull up menu for complete student status/study group list
This commit is contained in:
parent
fb8e948dfc
commit
8279665ab9
6 changed files with 98 additions and 86 deletions
|
@ -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 <></>;
|
||||
}
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue