Browse Source

Update frontend/src/pages/Account.jsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
fix/clean
Sacha GUERIN 5 months ago
committed by GitHub
parent
commit
60e706f598
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      frontend/src/pages/Account.jsx

5
frontend/src/pages/Account.jsx

@ -59,6 +59,10 @@ export default function Account() {
} }
} }
const fetchUserPlaylists = async () => { const fetchUserPlaylists = async () => {
if (!user.id || !token) {
console.warn("User ID or token missing, skipping playlists fetch");
return;
}
try { try {
const response = await fetch(`/api/playlists/user/${user.id}`, { const response = await fetch(`/api/playlists/user/${user.id}`, {
method: "GET", method: "GET",
@ -73,7 +77,6 @@ export default function Account() {
setUserPlaylists(data); setUserPlaylists(data);
} catch (error) { } catch (error) {
console.error("Error fetching user playlists:", error); console.error("Error fetching user playlists:", error);
return null;
} }
} }

Loading…
Cancel
Save