From 875a7154fa499ff95e028f96f973b06be4529950 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Fri, 7 Jul 2023 15:07:56 +0800 Subject: [PATCH] Improved homepage --- src/routes/Home/Home.tsx | 2 +- src/styles.tsx | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx index 9ec4010..1a392ed 100644 --- a/src/routes/Home/Home.tsx +++ b/src/routes/Home/Home.tsx @@ -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 ; } else { return ( @@ -77,7 +78,6 @@ export default function Home() { return ( - Template Homepage diff --git a/src/styles.tsx b/src/styles.tsx index 27285c0..f4d8f5d 100644 --- a/src/styles.tsx +++ b/src/styles.tsx @@ -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", }, });