deskripsi:
- fix page maps
- fix ViewWrapper : props styles di tambah
# No Issue
This commit is contained in:
2025-07-10 16:57:49 +08:00
parent c5798b3127
commit 6913e9e4b5
4 changed files with 18 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
// components/MapComponent.js
import React from "react";
import { StyleSheet, View } from "react-native";
import { DimensionValue, StyleSheet, View } from "react-native";
import MapView, { Marker } from "react-native-maps";
interface MapComponentProps {
@@ -9,7 +9,7 @@ interface MapComponentProps {
longitude?: number;
latitudeDelta?: number;
longitudeDelta?: number;
height?: number;
height?: DimensionValue;
}
const MapCustom = ({

View File

@@ -8,6 +8,8 @@ import {
ScrollView,
TouchableWithoutFeedback,
View,
StyleProp,
ViewStyle,
} from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
@@ -15,12 +17,14 @@ interface ViewWrapperProps {
children: React.ReactNode;
withBackground?: boolean;
footerComponent?: React.ReactNode;
style?: StyleProp<ViewStyle>;
}
const ViewWrapper = ({
children,
withBackground = false,
footerComponent,
style,
}: ViewWrapperProps) => {
const assetBackground = require("../../assets/images/main-background.png");
@@ -40,14 +44,14 @@ const ViewWrapper = ({
<ImageBackground
source={assetBackground}
resizeMode="cover"
style={GStyles.imageBackground}
style={[GStyles.imageBackground]}
>
<View style={GStyles.containerWithBackground}>
<View style={[GStyles.containerWithBackground, style]}>
{children}
</View>
</ImageBackground>
) : (
<View style={GStyles.container}>{children}</View>
<View style={[GStyles.container, style]}>{children}</View>
)}
</View>
</TouchableWithoutFeedback>