-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated UI part to load cities and select filter city
- Loading branch information
Showing
9 changed files
with
112 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
export interface CityDto{ | ||
city_id: number; | ||
city_name: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,20 @@ | ||
import axios from 'axios'; | ||
|
||
export const fetchAdverts = async () => { | ||
export const fetchAdverts = async (cityId: number) => { | ||
//return await axios.get('https://dimria-advert-prices.azurewebsites.net/api/get_advertisements'); | ||
return await axios.get('http://localhost:7071/api/get_advertisements'); | ||
return await axios.get(`http://localhost:7071/api/get_advertisements/${cityId}`); | ||
} | ||
|
||
export const fetchAdvertDetails = async (advertId: string) => { | ||
//return await axios.get(`https://dimria-advert-prices.azurewebsites.net/api/get_advert_details/${advertId}`); | ||
return await axios.get(`http://localhost:7071/api/get_advert_details/${advertId}`); | ||
} | ||
|
||
export const fetchCities = async () => { | ||
//return await axios.get('https://dimria-advert-prices.azurewebsites.net/api/get_cities'); | ||
return await axios.get('http://localhost:7071/api/get_cities'); | ||
} | ||
|
||
|
||
export const delay = (ms: number) => new Promise(res => setTimeout(res, ms)); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters