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