mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 07:54:57 -06:00
fix stuttering pan on map view
This commit is contained in:
parent
6172af3a5f
commit
804715a810
1 changed files with 6 additions and 4 deletions
|
|
@ -28,13 +28,15 @@ type Props = {
|
|||
};
|
||||
|
||||
const FoodMap = ({ foodItemsMap, region, onRegionChange, pushRoute, initialRegion }: Props) => {
|
||||
return !foodItemsMap ? null : (
|
||||
if (!foodItemsMap) {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<MapView
|
||||
initialRegion={initialRegion}
|
||||
region={region}
|
||||
region={region || initialRegion}
|
||||
style={{ flex: 1 }}
|
||||
onRegionChange={onRegionChange}>
|
||||
onRegionChangeComplete={onRegionChange}>
|
||||
{foodItemsMap
|
||||
.map((foodItem, id) => {
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue