From 4a0186abb481143e781d40bf5de1e44eac70e920 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=98=A4=EC=9D=B8=ED=98=81?= Date: Sun, 3 Mar 2024 01:48:12 +0900 Subject: [PATCH] =?UTF-8?q?Style:=20=EB=86=92=EC=9D=80=20=EB=93=B1?= =?UTF-8?q?=EC=88=98=20=EC=9D=B8=20=EA=B2=BD=EC=9A=B0=20=EB=A9=94=EB=8B=AC?= =?UTF-8?q?=20=EC=9D=B4=EB=AA=A8=EC=A7=80=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Rank/RankListView.js | 15 ++++++++++++++- src/pages/Rank/Rank.js | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/components/Rank/RankListView.js b/src/components/Rank/RankListView.js index cbcb730..2b28b25 100644 --- a/src/components/Rank/RankListView.js +++ b/src/components/Rank/RankListView.js @@ -23,10 +23,23 @@ const columns = [ ]; export default function RankListView({ teams }) { + const addMedalEmogi = (id) => { + switch (id) { + case 1: + return "🥇"; + case 2: + return "🥈"; + case 3: + return "🥉"; + default: + return id; + } + }; + const convertTeams2List = (teams) => { return teams?.map((team, idx) => { return { - id: idx + 1, + id: addMedalEmogi(idx + 1), groupNm: team.id, reportNm: team.reports, totalMins: team.totalMinutes, diff --git a/src/pages/Rank/Rank.js b/src/pages/Rank/Rank.js index af82334..0435442 100644 --- a/src/pages/Rank/Rank.js +++ b/src/pages/Rank/Rank.js @@ -14,6 +14,7 @@ import { useQuery } from "react-query"; import FullImage from "../../components/Rank/FullImage"; import ViewToggleButton from "../../components/Rank/ViewToggleButton"; +import { DataGrid } from "@mui/x-data-grid"; import RankListView from "../../components/Rank/RankListView"; import RankGridView from "../../components/Rank/RankGridView";