Skip to content

Commit e118279

Browse files
author
Sine Jespersen
committed
actually add proximityToUnlock
1 parent 27552fc commit e118279

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/points-of-interest/PointOfInterest.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function PointOfInterest({
2222
subtitles,
2323
podcast,
2424
IFrameUrl,
25+
proximityToUnlock,
2526
},
2627
index,
2728
destinationChanged,
@@ -51,7 +52,9 @@ function PointOfInterest({
5152
);
5253
setProximity(distance);
5354
if (!unlocked && id === nextUnlockableId) {
54-
setUnlocked(distance < accuracy);
55+
setUnlocked(
56+
distance < accuracy || distance < Number(proximityToUnlock)
57+
);
5558
}
5659
}
5760
}, [latitude, longitude, lat, long, geolocationAvailable]);

0 commit comments

Comments
 (0)