Homepage and container improvements

This commit is contained in:
Keannu Bernasol 2023-07-07 15:37:05 +08:00
parent 9e8317e7c0
commit d7710478b6
3 changed files with 16 additions and 23 deletions

View file

@ -10,14 +10,7 @@ export interface props {
export default function AnimatedContainer(props: props) { export default function AnimatedContainer(props: props) {
return ( return (
<MotiScrollView <MotiScrollView
contentContainerStyle={{ contentContainerStyle={styles.container}
alignItems: "center",
alignSelf: "center",
justifyContent: "flex-start",
display: "flex",
flexDirection: "column",
flex: 1,
}}
from={{ from={{
borderRadius: 0, borderRadius: 0,
backgroundColor: colors.orange_2, backgroundColor: colors.orange_2,

View file

@ -52,13 +52,17 @@ export default function Home() {
return <MapView style={styles.map} initialRegion={ustpCoords} />; return <MapView style={styles.map} initialRegion={ustpCoords} />;
} else { } else {
return ( return (
<Text style={styles.text_white_small}> <View>
<Text style={styles.text_white_medium}>
You must be within 1km of USTP to use Stud-E{"\n"} You must be within 1km of USTP to use Stud-E{"\n"}
</Text>
<Text style={styles.text_white_small}>
{dist}km away from USTP {"\n"} {dist}km away from USTP {"\n"}
User Location: User Location:
{"\n"} Latitude {location.coords.latitude} {"\n"} Latitude {location.coords.latitude}
{"\n"} Longitude {location.coords.longitude} {"\n"} Longitude {location.coords.longitude}
</Text> </Text>
</View>
); );
} }
} else { } else {

View file

@ -35,18 +35,13 @@ const styles = StyleSheet.create({
width: "100%", width: "100%",
}, },
container: { container: {
flex: 1,
marginVertical: "5%",
width: "92%",
borderRadius: 15,
// backgroundColor: colors.blue_2,
alignItems: "center", alignItems: "center",
alignSelf: "center", alignSelf: "center",
paddingTop: 32, justifyContent: "center",
paddingBottom: 32,
justifyContent: "flex-start",
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
flex: 1,
paddingHorizontal: 4,
}, },
flex_row: { flex_row: {
display: "flex", display: "flex",
@ -57,6 +52,7 @@ const styles = StyleSheet.create({
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
alignItems: "center", alignItems: "center",
justifyContent: "center",
}, },
text_white_tiny: { text_white_tiny: {
color: colors.text_default, color: colors.text_default,