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 { useEffect, useState } from 'preact/hooks';
|
||||||
import { getListRecentLocationsRatingsService } from '../../services';
|
import { getListRecentLocationsRatingsService } from '../../services';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { useNavigate } from 'react-router-dom';
|
||||||
|
import { LocationInfo } from '../../domains/LocationInfo';
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
type News = {
|
type News = {
|
||||||
header: string,
|
header: string,
|
||||||
@ -29,7 +18,7 @@ type News = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function Home() {
|
function Home() {
|
||||||
const [recentLocations, setRecentLocations] = useState<Array<NewPlaces>>([])
|
const [recentLocations, setRecentLocations] = useState<Array<LocationInfo>>([])
|
||||||
// const [isLoading, setIsLoading] = useState<boolean>(true)
|
// const [isLoading, setIsLoading] = useState<boolean>(true)
|
||||||
|
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
|
Loading…
Reference in New Issue
Block a user