Skip to content

Commit

Permalink
Style: 높은 등수 인 경우 메달 이모지 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
오인혁 authored and 오인혁 committed Mar 2, 2024
1 parent 333e8f9 commit 4a0186a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/Rank/RankListView.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/pages/Rank/Rank.js
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit 4a0186a

Please sign in to comment.