Skip to content

Commit bf74509

Browse files
Removed usecolor scheme.
1 parent 6167d8f commit bf74509

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

components/Location.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ import {
55
Button,
66
ActivityIndicator,
77
StyleSheet,
8-
useColorScheme,
8+
//useColorScheme,
99
} from "react-native";
1010
import MapView, { Marker, PROVIDER_GOOGLE } from "react-native-maps";
1111
import { useLocation } from "../hooks/useLocation";
12+
import { useNavigation } from "@react-navigation/native";
1213

1314
export default function LocationComponent() {
1415
const { location, address, error, loading, fetchLocation } = useLocation();
15-
const colorScheme = useColorScheme(); // Get the current color scheme
16-
const textColor = colorScheme === "dark" ? "#ffffff" : "#000000"; // Dynamic text color
16+
//const colorScheme = useColorScheme(); // Get the current color scheme
17+
//const textColor = colorScheme === "dark" ? "#ffffff" : "#000000"; // Dynamic text color
18+
const textColor = "#ffffff";
19+
console.log("Navigation context:", useNavigation());
1720

1821
return (
1922
<View style={styles.container}>
@@ -34,7 +37,7 @@ export default function LocationComponent() {
3437
{/* Native Map */}
3538
<View style={styles.mapContainer}>
3639
<MapView
37-
provider={PROVIDER_GOOGLE}
40+
//provider={PROVIDER_GOOGLE}
3841
style={styles.map}
3942
region={
4043
location
@@ -91,10 +94,13 @@ const styles = StyleSheet.create({
9194
},
9295
mapContainer: {
9396
width: "100%",
94-
height: 300,
97+
height: 300, // Ensure a fixed height
9598
marginTop: 16,
99+
borderRadius: 10,
100+
overflow: "hidden",
96101
},
97102
map: {
98-
flex: 1,
103+
width: "100%", // Explicit width
104+
height: "100%", // Explicit height
99105
},
100106
});

0 commit comments

Comments
 (0)