Skip to content

Commit

Permalink
Merge branch 'leaderboard-api' of https://github.com/CS3219-AY2324S1/…
Browse files Browse the repository at this point in the history
  • Loading branch information
ckcherry23 committed Nov 14, 2023
2 parents b41fd18 + 35e66b6 commit 9e28054
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/src/pages/interviews/index.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -53,7 +53,7 @@ export default function Interviews() {
const [selectedLanguage, setSelectedLanguage] = useState(
languages.length > 0 ? languages[0].value : "c++"
);
const [leaderboardData, setLeaderboardData] = useState<Array<LeaderboardUser>>([]);
const [leaderboardData, setLeaderboardData] = useState<Array<PublicUser>>([]);

useEffect(() => {
if (currentUser) {
Expand All @@ -76,7 +76,7 @@ export default function Interviews() {

useEffect(() => {
fetchLeaderboard().then((data) => {
setLeaderboardData(data as Array<LeaderboardUser>);
setLeaderboardData(data as Array<PublicUser>);
});
}, [])

Expand Down

0 comments on commit 9e28054

Please sign in to comment.