From eb1445f38f132d073728d21b24187155e02f5f3c Mon Sep 17 00:00:00 2001 From: Phoenix Isaac Pereira Date: Fri, 20 Sep 2024 17:24:03 +0930 Subject: [PATCH] Change fetch order --- src/App.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 41806c5..ce0826e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -65,9 +65,6 @@ export default function App() { const [token, setToken] = useState(null); const [profile, setProfile] = useState(null); - const trackData: TrackData = useTop100Tracks(); - const artistData: ArtistData = useTop50Artists(); - useEffect(() => { const hash = window.location.hash; let localToken = window.localStorage.getItem('token'); @@ -101,6 +98,8 @@ export default function App() { }; const isLoggedIn = !!token; + const trackData: TrackData = useTop100Tracks(); + const artistData: ArtistData = useTop50Artists(); return (