url port removal
This commit is contained in:
1
common/config.js
Normal file
1
common/config.js
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export const BASE_URL = '138.68.67.31';
|
||||||
508
web/dist/app.bundle.js
vendored
508
web/dist/app.bundle.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,9 @@
|
|||||||
import fetch from 'isomorphic-fetch'
|
import fetch from 'isomorphic-fetch'
|
||||||
|
import {BASE_URL} from '../../../common/config'
|
||||||
//const BASE_URL = 'localhost';
|
|
||||||
const BASE_URL = '138.68.67.31';
|
|
||||||
|
|
||||||
export const saveContactRequest = (listingId, params) => {
|
export const saveContactRequest = (listingId, params) => {
|
||||||
|
|
||||||
let url = `http://${BASE_URL}:3001/api/contact/${listingId}`
|
let url = `http://${BASE_URL}/api/contact/${listingId}`
|
||||||
|
|
||||||
return fetch(url, {
|
return fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -18,7 +16,7 @@ export const saveContactRequest = (listingId, params) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const loadListing = id => {
|
export const loadListing = id => {
|
||||||
let url = `http://${BASE_URL}:3001/api/search/listings/${id}`
|
let url = `http://${BASE_URL}/api/search/listings/${id}`
|
||||||
|
|
||||||
return fetch(
|
return fetch(
|
||||||
url,
|
url,
|
||||||
@@ -51,7 +49,7 @@ export const loadProperties = (
|
|||||||
|
|
||||||
// TODO: handle errors
|
// TODO: handle errors
|
||||||
//return fetch(process.env.API_URL + '/api/search', {
|
//return fetch(process.env.API_URL + '/api/search', {
|
||||||
let url = `http://${BASE_URL}:3001/api/search/listings?bounds=${bounds}&minPrice=${minPrice}&maxPrice=${maxPrice}&rooms=${allRooms}&minSize=${minSize}&maxSize=${maxSize}&adType=${adType}&category=${allCategories}&page=${page}&pins=${pins}&sort=${sort}`
|
let url = `http://${BASE_URL}/api/search/listings?bounds=${bounds}&minPrice=${minPrice}&maxPrice=${maxPrice}&rooms=${allRooms}&minSize=${minSize}&maxSize=${maxSize}&adType=${adType}&category=${allCategories}&page=${page}&pins=${pins}&sort=${sort}`
|
||||||
|
|
||||||
return fetch(
|
return fetch(
|
||||||
url,
|
url,
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import {BASE_URL} from '../../../common/config'
|
||||||
|
|
||||||
export const formatPrice = p => {
|
export const formatPrice = p => {
|
||||||
if (isNaN(p)) {
|
if (isNaN(p)) {
|
||||||
return 'Po dogovoru'
|
return 'Po dogovoru'
|
||||||
@@ -33,8 +35,7 @@ S poštovanjem
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const listingUrl = (id) => {
|
export const listingUrl = (id) => {
|
||||||
// TODO: fix this once removing hardcoded values
|
return `http://${BASE_URL}/?listingId=${id}`
|
||||||
return `http://138.68.67.31:8080/?listingId=${id}`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isMobile = () => window.matchMedia("(max-width: 768px)").matches
|
export const isMobile = () => window.matchMedia("(max-width: 768px)").matches
|
||||||
|
|||||||
Reference in New Issue
Block a user