Skip to content

Commit c06ca51

Browse files
fix: profile page data fetching
1 parent 12d4e8a commit c06ca51

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/pages/profile/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ const ProfilePage: NextPage = () => {
5454

5555
useEffect(() => {
5656
const fetchStats = async () => {
57-
const playerStats = await getPlayerStats(user?.lichessId)
57+
const playerStats = await getPlayerStats()
5858
setStats(playerStats)
5959
}
6060

6161
if (!user?.lichessId) router.push('/')
6262

6363
fetchStats()
64-
}, [])
64+
}, [user])
6565

6666
return (
6767
<AuthenticatedWrapper>

0 commit comments

Comments
 (0)