Skip to content

Commit 929d678

Browse files
authored
fix : 랭킹 메달 이미지 수정 (#134)
1 parent 77953be commit 929d678

File tree

4 files changed

+19
-4
lines changed

4 files changed

+19
-4
lines changed
Lines changed: 1 addition & 0 deletions
Loading

public/icons/medal/gold_medal.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,20 @@
1-
import { Award, Crown, Medal } from 'lucide-react';
1+
import Gold from './../../../../public/icons/medal/gold_medal.svg';
2+
import Silver from './../../../../public/icons/medal/silver_medal.svg';
3+
import Bronze from './../../../../public/icons/medal/bronze_medal.svg';
4+
import Image from 'next/image';
25

36
export const getRankIcon = (rank: number) => {
4-
if (rank === 1) return <Crown className="w-6 h-6 text-yellow-400" />;
5-
if (rank === 2) return <Medal className="w-6 h-6 text-gray-300" />;
6-
if (rank === 3) return <Award className="w-6 h-6 text-amber-600" />;
7+
if (rank === 1)
8+
return (
9+
<Image width={20} height={20} src={Gold} alt="medal" className="w-6 h-6 text-yellow-400" />
10+
);
11+
if (rank === 2)
12+
return (
13+
<Image width={20} height={20} alt="medal" src={Silver} className="w-6 h-6 text-gray-300" />
14+
);
15+
if (rank === 3)
16+
return (
17+
<Image width={20} height={20} alt="medal" src={Bronze} className="w-6 h-6 text-amber-600" />
18+
);
719
return <span className="text-lg font-bold text-[#00d084]">#{rank}</span>;
820
};

0 commit comments

Comments
 (0)