Skip to content
Snippets Groups Projects
Commit a31ac244 authored by Anael Lacour's avatar Anael Lacour
Browse files

WIP on fix

parent 96d59b78
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,8 @@ import { TouchableOpacity, Button, View, Text } from "react-native";
export const InfoWindow = (props) => {
const { place, navigation } = props;
const goTo = () => navigation.navigate("vuDetails");
const goTo = () => navigation.navigate("vuDetails",{name : place});
const infoWindowStyle = {
position: 'relative',
bottom: 150,
......@@ -31,17 +32,18 @@ export const InfoWindow = (props) => {
<Text style = {{ color: 'lightgrey' }}>
{String.fromCharCode(9733).repeat(5 - Math.floor(place.rating))}
</Text>
<Button onPress={goTo} title={`voir`} />
</View>
</View>
</TouchableOpacity>
)
return (
<div ref={ref}>
{isComponentVisible &&(
<TouchableOpacity>
<div style={infoWindowStyle}>
<div style={{ fontSize: 16 }}>
{place.name}
</div>
......@@ -72,5 +74,5 @@ export const InfoWindow = (props) => {
)}
</div>
);
};
\ No newline at end of file
};
import React from "react";
import { View, Text, StyleSheet, Button } from "react-native";
export default function Detail ({navigation}) {
export default function Detail (props) {
const {route,navigation}=props
console.log(route.params.name)
const goTo = () => navigation.navigate("stackMap");
return (
......
......@@ -11,11 +11,13 @@ export default function MapHome ({ navigation }) {
initialRouteName='vuDetails'
screenOptions={{ headerShown: false }}>
<Stack.Screen name='stackMap'>
{() => <CustomMap navigation = {navigation} />}
{props => <CustomMap {...props} />}
</Stack.Screen>
<Stack.Screen name='vuDetails'>
{() => <Detail navigation = {navigation}/>}
{props => <Detail {...props} />}
</Stack.Screen>
</Stack.Navigator>
)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment