Skip to content
This repository was archived by the owner on Apr 19, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/VenueMapOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import VenueContactInfo from "./VenueContactInfo";

export default ({ selectedVenue, showDetails }) => {
return (
<ViewContainer opaque={true}>
<ViewContainer style={{ position: "absolute", bottom: 0, width: "100%" }} opaque={true}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Løste dette et problem, eller ble det lagt til som en "forsikring" mot at kartet flytter på seg?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tru det eller ei, men det løste hele kartproblemet

<View style={{ flexDirection: "row", marginBottom: COMPONENT_SPACING }}>
<VenueContactInfo
name={selectedVenue.name}
Expand Down
15 changes: 10 additions & 5 deletions app/containers/Map.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {Component} from "react";
import MapView, {Marker} from "react-native-maps";
import {Geolocation} from "react-native";
import React, { Component } from "react";
import MapView, { Marker } from "react-native-maps";
import { Geolocation } from "react-native";
import colors from "../settings/defaultStyles";

export default class Map extends Component {
Expand All @@ -13,7 +13,7 @@ export default class Map extends Component {
}

componentDidMount() {
navigator.geolocation.getCurrentPosition(({coords}) =>
navigator.geolocation.getCurrentPosition(({ coords }) =>
this.map.animateToCoordinate(coords)
);
}
Expand Down Expand Up @@ -47,6 +47,7 @@ export default class Map extends Component {
}}
onPress={e => {
this.props.deselectVenue();
this.removeMarkers();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

}}
onPoiClick={e => {
this.props.onVenueSelect(e.nativeEvent.placeId);
Expand All @@ -67,6 +68,10 @@ export default class Map extends Component {

animateTo(coordinates) {
this.map.animateToCoordinate(coordinates);
this.setState({markers: [coordinates]});
this.setState({ markers: [coordinates] });
}

removeMarkers() {
this.setState({ markers: [] });
}
}
10 changes: 7 additions & 3 deletions app/containers/Review.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ export default class Review extends Component {
}

renderProperty(property, review) {
const {value} = review;
return (
<View key={property.name}>
<View style={[styles.row, styles.property]}>
<PropertyTitle property={property} size={22} style={{flex: 1}}/>
<MaterialIcons
name={value ? "thumb-up" : "thumb-down"}
color={value ? colors.positiveColor : colors.negativeColor}
name={this.reviewIsPositive(review) ? "thumb-up" : "thumb-down"}
color={this.reviewIsPositive(review) ? colors.positiveColor : colors.negativeColor}
Comment on lines +68 to +69
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

size={23}
/>
</View>
Expand All @@ -86,6 +85,11 @@ export default class Review extends Component {
);
}

reviewIsPositive(review){
const {value} = review;
return (value > 0);
}

toggleComments() {
this.setState({showComments: !this.state.showComments});
}
Expand Down
Loading