diff --git a/packages/frontend/src/components/gamePage/leftSection/GamePhases/EndingResult.tsx b/packages/frontend/src/components/gamePage/leftSection/GamePhases/EndingResult.tsx index f8c5cfa..8bf4c6f 100644 --- a/packages/frontend/src/components/gamePage/leftSection/GamePhases/EndingResult.tsx +++ b/packages/frontend/src/components/gamePage/leftSection/GamePhases/EndingResult.tsx @@ -15,38 +15,43 @@ export default function EndingResult({ endingResult }: IEndingPhaseProps) { const resultImage = isPinocoWin ? '/images/ending/pinocoWin.png' : '/images/ending/geppettoWin.png'; + const getEndingMessage = () => { - if (guessingWord && isGuessed) { + if (!isGuessed) return; + if (isPinocoWin) { return ( <> - 피노코가 제시어를 맞추며 위기에서 벗어났습니다! 제출된 제시어:{' '} + 피노코가 제시어를 맞추며 위기에서 벗어났습니다! 제출된 제시어 :{' '} + {guessingWord} + > + ); + } else { + return ( + <> + 투표로 지목된 피노코가 제시어를 맞추지 못했습니다! 제출된 제시어 :{' '} {guessingWord} > ); } - - if (isPinocoWin) { - return <>피노코가 자신의 정체를 숨기며 제페토를 속였습니다 😉>; - } - - return <>피노코가 제시어를 맞추지 못했습니다 🔨>; }; return ( -
- 피노코는 {pinoco} 였습니다! + 피노코는 {pinoco}였습니다!
{getEndingMessage()}