From 408ff41b7d6e4a7913ad8e8072e1644e33d8e98b Mon Sep 17 00:00:00 2001 From: NCanggoro Date: Tue, 3 Oct 2023 14:52:42 +0700 Subject: [PATCH] fix home location info state --- src/pages/Home/index.tsx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/pages/Home/index.tsx b/src/pages/Home/index.tsx index f55fe3b..8e9970b 100644 --- a/src/pages/Home/index.tsx +++ b/src/pages/Home/index.tsx @@ -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>([]) + const [recentLocations, setRecentLocations] = useState>([]) // const [isLoading, setIsLoading] = useState(true) const navigate = useNavigate()