From 35e66b662cfb5f7eeb0e4f21823d95c4cd340855 Mon Sep 17 00:00:00 2001 From: chunweii <47494777+chunweii@users.noreply.github.com> Date: Wed, 15 Nov 2023 01:37:54 +0800 Subject: [PATCH] Fix data type issue causing build issue --- frontend/src/pages/interviews/index.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/frontend/src/pages/interviews/index.tsx b/frontend/src/pages/interviews/index.tsx index 42db8d66..3a9b62da 100644 --- a/frontend/src/pages/interviews/index.tsx +++ b/frontend/src/pages/interviews/index.tsx @@ -1,5 +1,5 @@ import DifficultySelector from "@/components/common/difficulty-selector"; -import { columns } from "@/components/interviews/leaderboard/columns"; +import { columns, PublicUser } from "@/components/interviews/leaderboard/columns"; import { DataTable } from "@/components/interviews/leaderboard/data-table"; import { languages } from "@/components/room/code-editor"; import { Button } from "@/components/ui/button"; @@ -32,13 +32,6 @@ import { useLeaderboard } from "@/hooks/useLeaderboard"; type Difficulty = "easy" | "medium" | "hard" | "any"; -type LeaderboardUser = { - id: string; - displayName: string; - photoURL: string; - attempts: number; -}; - export default function Interviews() { const { user: currentUser } = useContext(AuthContext); @@ -53,7 +46,7 @@ export default function Interviews() { const [selectedLanguage, setSelectedLanguage] = useState( languages.length > 0 ? languages[0].value : "c++" ); - const [leaderboardData, setLeaderboardData] = useState>([]); + const [leaderboardData, setLeaderboardData] = useState>([]); useEffect(() => { if (currentUser) { @@ -76,7 +69,7 @@ export default function Interviews() { useEffect(() => { fetchLeaderboard().then((data) => { - setLeaderboardData(data as Array); + setLeaderboardData(data as Array); }); }, [])