Skip to content

Commit a6de98b

Browse files
fix: build errors
1 parent ba290fd commit a6de98b

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/pages/profile/index.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { NextPage } from 'next'
33
import { useRouter } from 'next/router'
44
import { useContext, useState, useEffect } from 'react'
55

6+
import { PlayerStats } from 'src/types'
67
import { getPlayerStats } from 'src/api'
78
import { UserIcon } from 'src/components/Icons/icons'
89
import { AuthContext, WindowSizeContext } from 'src/contexts'
@@ -11,7 +12,7 @@ import { AuthenticatedWrapper, UserProfile, GameList } from 'src/components'
1112
const ProfilePage: NextPage = () => {
1213
const router = useRouter()
1314
const { user } = useContext(AuthContext)
14-
const [stats, setStats] = useState({
15+
const [stats, setStats] = useState<PlayerStats>({
1516
regularRating: 0,
1617
regularWins: 0,
1718
regularDraws: 0,
@@ -74,9 +75,7 @@ const ProfilePage: NextPage = () => {
7475
}
7576

7677
interface Props {
77-
stats: {
78-
[key: string]: number
79-
}
78+
stats: PlayerStats
8079
}
8180
const Profile: React.FC<Props> = (props: Props) => {
8281
const { user } = useContext(AuthContext)

0 commit comments

Comments
 (0)