Improved homepage

This commit is contained in:
Keannu Bernasol 2023-07-07 15:07:56 +08:00
parent d9adc45b27
commit 875a7154fa
2 changed files with 7 additions and 3 deletions

View file

@ -48,6 +48,7 @@ export default function Home() {
function CustomMap() {
if (dist !== null && location !== null) {
if (dist <= 1) {
// Just switch this condition for map debugging
return <MapView style={styles.map} initialRegion={ustpCoords} />;
} else {
return (
@ -77,7 +78,6 @@ export default function Home() {
return (
<View style={styles.background}>
<AnimatedContainer>
<Text style={styles.text_white_large}>Template Homepage</Text>
<CustomMap />
</AnimatedContainer>
</View>

View file

@ -3,6 +3,9 @@ import { StyleSheet, Dimensions } from "react-native";
const width = Dimensions.get("window").width;
const height = Dimensions.get("window").height;
const containerWidth = width - width * 0.08;
const containerHeight = height - height * 0.01;
export const colors = {
orange_1: "#FFBC72",
orange_2: "#FFE2C1",
@ -109,8 +112,9 @@ const styles = StyleSheet.create({
marginVertical: 6,
},
map: {
height: 512,
width: "90%",
flex: 1,
height: containerHeight,
width: containerWidth,
alignSelf: "center",
},
});