Ajuste do raio para buscar só dentro do tamanho da tela do celular
This commit is contained in:
@@ -49,7 +49,7 @@ export async function getUsersSearching(currentPoint: any) {
|
|||||||
// Replace lat/long with values from get current location.
|
// Replace lat/long with values from get current location.
|
||||||
// Allow choosing of radius?
|
// Allow choosing of radius?
|
||||||
// Offset could = amount loaded in an infinite scroll?
|
// Offset could = amount loaded in an infinite scroll?
|
||||||
var latitude = currentPoint.latitude, longitude = currentPoint.longitude, radius = 5000, offset = 0;
|
var latitude = currentPoint.latitude, longitude = currentPoint.longitude, radius = 3000, offset = 0;
|
||||||
const response = await fetch(`http://localhost:4000/get-records?latitude=${ latitude }&longitude=${ longitude }&radius=${ radius }&offset=${ offset }`);
|
const response = await fetch(`http://localhost:4000/get-records?latitude=${ latitude }&longitude=${ longitude }&radius=${ radius }&offset=${ offset }`);
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
setStore(data);
|
setStore(data);
|
||||||
|
|||||||
Reference in New Issue
Block a user