From a6de98b3253830be81d114cdf3d6a8052b7a9b72 Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Wed, 11 Dec 2024 19:15:35 -0800 Subject: [PATCH] fix: build errors --- src/pages/profile/index.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index ceaf1f9..7a18a44 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -3,6 +3,7 @@ import { NextPage } from 'next' import { useRouter } from 'next/router' import { useContext, useState, useEffect } from 'react' +import { PlayerStats } from 'src/types' import { getPlayerStats } from 'src/api' import { UserIcon } from 'src/components/Icons/icons' import { AuthContext, WindowSizeContext } from 'src/contexts' @@ -11,7 +12,7 @@ import { AuthenticatedWrapper, UserProfile, GameList } from 'src/components' const ProfilePage: NextPage = () => { const router = useRouter() const { user } = useContext(AuthContext) - const [stats, setStats] = useState({ + const [stats, setStats] = useState({ regularRating: 0, regularWins: 0, regularDraws: 0, @@ -74,9 +75,7 @@ const ProfilePage: NextPage = () => { } interface Props { - stats: { - [key: string]: number - } + stats: PlayerStats } const Profile: React.FC = (props: Props) => { const { user } = useContext(AuthContext)