diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 36de62b..b6ff07a 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -25,7 +25,7 @@ export default function DashboardPage() { } async function fetchStats() { try { - const res = await fetch(`/api/users/${userId}/stats`) + const res = await fetch(`/api/users/${currentUserId}/stats`) if (res.ok) { const data = await res.json() setUserStats(data) @@ -37,7 +37,7 @@ export default function DashboardPage() { } } fetchStats() - }, [user?.id]) + }, [userLoading, user?.id, userId]) const handleExport = async () => { try {