adjust location state with new response
This commit is contained in:
parent
5183a90b59
commit
f1fd9bcbb9
2765
pnpm-lock.yaml
2765
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
@ -147,8 +147,8 @@ function Discovery() {
|
|||||||
|
|
||||||
async function getRecentLocations() {
|
async function getRecentLocations() {
|
||||||
try {
|
try {
|
||||||
const locations = await getListRecentLocationsRatingsService(20)
|
const locations = await getListRecentLocationsRatingsService(15)
|
||||||
setData((prevState) => ({ ...prevState, locations: locations.data }))
|
setData((prevState) => ({ ...prevState, locations: locations.data.locations }))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ function Home() {
|
|||||||
async function getRecentLocations() {
|
async function getRecentLocations() {
|
||||||
try {
|
try {
|
||||||
const locations = await getListRecentLocationsRatingsService(12)
|
const locations = await getListRecentLocationsRatingsService(12)
|
||||||
setRecentLocations(locations.data)
|
setRecentLocations(locations.data.locations)
|
||||||
// setIsLoading(false)
|
// setIsLoading(false)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
Loading…
Reference in New Issue
Block a user