14 lines
374 B
JavaScript
14 lines
374 B
JavaScript
|
|
import fetch from 'isomorphic-fetch';
|
||
|
|
|
||
|
|
export const loadProperties = ({bounds, minPrice = 0}) => {
|
||
|
|
// TODO: handle errors
|
||
|
|
//return fetch(process.env.API_URL + '/api/search', {
|
||
|
|
return fetch(`http://localhost:3001/api/search?bounds=${bounds}&minPrice=${minPrice}`, {
|
||
|
|
//credentials: 'include'
|
||
|
|
});
|
||
|
|
|
||
|
|
//const body = await res.text();
|
||
|
|
//return JSON.parse(body);
|
||
|
|
}
|
||
|
|
|