Skip to content

Commit 3dec714

Browse files
authored
Merge pull request #328 from Team-INSERT/hotfix/#327
게임 결과 퍼블리싱 이슈
2 parents 2f1f120 + 761402f commit 3dec714

File tree

1 file changed

+31
-26
lines changed

1 file changed

+31
-26
lines changed

src/pages/result/ui/index.tsx

+31-26
Original file line numberDiff line numberDiff line change
@@ -103,33 +103,38 @@ export const Result = () => {
103103
</S.RankTable>
104104
</S.RankingBox>
105105
<S.Podium>
106-
<S.FirstPlaceCharacter>
107-
<S.CrownPosition>
108-
<Crown />
109-
</S.CrownPosition>
110-
<S.Flash src={flash} />
111-
<Character
112-
characterColor={
113-
itemRoomResult[0]?.color.toLowerCase() || "defaultColor"
114-
}
115-
/>
116-
</S.FirstPlaceCharacter>
117-
118-
<S.SecondPlaceCharacter>
119-
<Character
120-
characterColor={
121-
itemRoomResult[1]?.color.toLowerCase() || "defaultColor"
122-
}
123-
/>
124-
</S.SecondPlaceCharacter>
106+
{itemRoomResult.length >= 1 && (
107+
<S.FirstPlaceCharacter>
108+
<S.CrownPosition>
109+
<Crown />
110+
</S.CrownPosition>
111+
<S.Flash src={flash} />
112+
<Character
113+
characterColor={
114+
itemRoomResult[0]?.color.toLowerCase() || "defaultColor"
115+
}
116+
/>
117+
</S.FirstPlaceCharacter>
118+
)}
119+
{itemRoomResult.length >= 2 && (
120+
<S.SecondPlaceCharacter>
121+
<Character
122+
characterColor={
123+
itemRoomResult[1]?.color.toLowerCase() || "defaultColor"
124+
}
125+
/>
126+
</S.SecondPlaceCharacter>
127+
)}
125128

126-
<S.ThirdPlaceCharacter>
127-
<Character
128-
characterColor={
129-
itemRoomResult[2]?.color.toLowerCase() || "defaultColor"
130-
}
131-
/>
132-
</S.ThirdPlaceCharacter>
129+
{itemRoomResult.length >= 3 && (
130+
<S.ThirdPlaceCharacter>
131+
<Character
132+
characterColor={
133+
itemRoomResult[2]?.color.toLowerCase() || "defaultColor"
134+
}
135+
/>
136+
</S.ThirdPlaceCharacter>
137+
)}
133138

134139
<S.PodiumImg src={Podium} alt="Podium 이미지" />
135140

0 commit comments

Comments
 (0)