fix
deskripsi: - fix page maps - fix ViewWrapper : props styles di tambah # No Issue
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { TextCustom, ViewWrapper } from "@/components";
|
||||
import { MapCustom, ViewWrapper } from "@/components";
|
||||
|
||||
export default function Maps() {
|
||||
return (
|
||||
<ViewWrapper>
|
||||
<TextCustom>Maps</TextCustom>
|
||||
</ViewWrapper>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<ViewWrapper style={{ paddingInline: 0, paddingBlock: 0 }}>
|
||||
<MapCustom height={"100%"} />
|
||||
</ViewWrapper>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 = ({
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -31,8 +31,8 @@ export default function LoginView() {
|
||||
console.log("login user id :", id);
|
||||
|
||||
// router.navigate("/verification");
|
||||
router.navigate(`/(application)/(user)/profile/${id}`);
|
||||
// router.navigate("/(application)/(user)/home");
|
||||
// router.navigate(`/(application)/(user)/profile/${id}`);
|
||||
router.navigate("/(application)/(user)/home");
|
||||
// router.navigate(`/(application)/profile/${id}/edit`);
|
||||
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
||||
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
||||
|
||||
Reference in New Issue
Block a user