Load listing details from the server

This commit is contained in:
Edin Dazdarevic
2017-04-08 00:06:06 +02:00
parent a1e4a35d17
commit ffdf1d36b3
6 changed files with 188 additions and 42 deletions

View File

@@ -1,5 +1,13 @@
import fetch from 'isomorphic-fetch';
export const loadListing = (id) => {
let url = `http://localhost:3001/api/search/listings/${id}`;
return fetch(url, {
//credentials: 'include'
});
};
export const loadProperties = ({
bounds,
minPrice = '',

View File

@@ -56,7 +56,8 @@ const viewListingDetails = ({ type, action }, component) => {
listingDetails: true,
listingId: action.id,
descriptionExpanded: false,
imageIndex: 0
imageIndex: 0,
listing: action.listing
}, () => {
markSeen(action.id);
const m = component.findMarker(action.id);