fix home location info state
This commit is contained in:
parent
f1b508685e
commit
408ff41b7d
@ -7,18 +7,7 @@ import './style.css';
|
||||
import { useEffect, useState } from 'preact/hooks';
|
||||
import { getListRecentLocationsRatingsService } from '../../services';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
type NewPlaces = {
|
||||
id: Number,
|
||||
name: string,
|
||||
thumbnail: NullValueRes<'String', string>,
|
||||
regency_name: String,
|
||||
province_name: String,
|
||||
critic_score: Number,
|
||||
critic_count: Number,
|
||||
user_score: Number,
|
||||
user_count: Number
|
||||
}
|
||||
import { LocationInfo } from '../../domains/LocationInfo';
|
||||
|
||||
type News = {
|
||||
header: string,
|
||||
@ -29,7 +18,7 @@ type News = {
|
||||
}
|
||||
|
||||
function Home() {
|
||||
const [recentLocations, setRecentLocations] = useState<Array<NewPlaces>>([])
|
||||
const [recentLocations, setRecentLocations] = useState<Array<LocationInfo>>([])
|
||||
// const [isLoading, setIsLoading] = useState<boolean>(true)
|
||||
|
||||
const navigate = useNavigate()
|
||||
|
Loading…
Reference in New Issue
Block a user