Skip to content

Commit

Permalink
Change fetch order
Browse files Browse the repository at this point in the history
  • Loading branch information
phoenixpereira committed Sep 20, 2024
1 parent 7c8b1c7 commit eb1445f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ export default function App() {
const [token, setToken] = useState<string | null>(null);
const [profile, setProfile] = useState<ProfileData | null>(null);

const trackData: TrackData = useTop100Tracks();
const artistData: ArtistData = useTop50Artists();

useEffect(() => {
const hash = window.location.hash;
let localToken = window.localStorage.getItem('token');
Expand Down Expand Up @@ -101,6 +98,8 @@ export default function App() {
};

const isLoggedIn = !!token;
const trackData: TrackData = useTop100Tracks();
const artistData: ArtistData = useTop50Artists();

return (
<div className="min-h-screen bg-white">
Expand Down

0 comments on commit eb1445f

Please sign in to comment.