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,9 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components"; import { MapCustom, ViewWrapper } from "@/components";
export default function Maps() { export default function Maps() {
return ( return (
<ViewWrapper> <ViewWrapper style={{ paddingInline: 0, paddingBlock: 0 }}>
<TextCustom>Maps</TextCustom> <MapCustom height={"100%"} />
</ViewWrapper> </ViewWrapper>
) );
} }

View File

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

View File

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

View File

@@ -31,8 +31,8 @@ export default function LoginView() {
console.log("login user id :", id); console.log("login user id :", id);
// router.navigate("/verification"); // router.navigate("/verification");
router.navigate(`/(application)/(user)/profile/${id}`); // router.navigate(`/(application)/(user)/profile/${id}`);
// router.navigate("/(application)/(user)/home"); router.navigate("/(application)/(user)/home");
// router.navigate(`/(application)/profile/${id}/edit`); // router.navigate(`/(application)/profile/${id}/edit`);
// router.navigate(`/(application)/(user)/portofolio/${id}`) // router.navigate(`/(application)/(user)/portofolio/${id}`)
// router.navigate(`/(application)/(image)/preview-image/${id}`); // router.navigate(`/(application)/(image)/preview-image/${id}`);