diff options
| author | nsfisis <nsfisis@gmail.com> | 2024-07-22 04:44:31 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2024-07-22 04:44:31 +0900 |
| commit | 14bbc483fdb338c8e55e77f267ecf0d51415549b (patch) | |
| tree | 6e9130c2c1f76da25c825090bb59220ecf60d971 /frontend/src/routes/golf/play/apps/Finished.tsx | |
| parent | d3107cdf9bafbebc4a9cdd6ab91869f8086b3246 (diff) | |
| download | phperkaigi-2025-albatross-14bbc483fdb338c8e55e77f267ecf0d51415549b.tar.gz phperkaigi-2025-albatross-14bbc483fdb338c8e55e77f267ecf0d51415549b.tar.zst phperkaigi-2025-albatross-14bbc483fdb338c8e55e77f267ecf0d51415549b.zip | |
prettier
Diffstat (limited to 'frontend/src/routes/golf/play/apps/Finished.tsx')
| -rw-r--r-- | frontend/src/routes/golf/play/apps/Finished.tsx | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/frontend/src/routes/golf/play/apps/Finished.tsx b/frontend/src/routes/golf/play/apps/Finished.tsx index 9922e07..bad7526 100644 --- a/frontend/src/routes/golf/play/apps/Finished.tsx +++ b/frontend/src/routes/golf/play/apps/Finished.tsx @@ -1,30 +1,27 @@ type Props = { gameId: number; playerId: number; - result: { yourScore: number | null, opponentScore: number | null }; + result: { yourScore: number | null; opponentScore: number | null }; }; export default ({ result }: Props) => { const { yourScore, opponentScore } = result; const yourScoreToCompare = yourScore ?? Infinity; const opponentScoreToCompare = opponentScore ?? Infinity; - const resultText = yourScoreToCompare === opponentScoreToCompare ? '引き分け' : (yourScoreToCompare < opponentScoreToCompare ? 'あなたの勝ち' : 'あなたの負け'); + const resultText = + yourScoreToCompare === opponentScoreToCompare + ? "引き分け" + : yourScoreToCompare < opponentScoreToCompare + ? "あなたの勝ち" + : "あなたの負け"; return ( <> + <div>対戦終了</div> <div> - 対戦終了 - </div> - <div> - <div> - {resultText} - </div> - <div> - あなたのスコア: {yourScore ?? 'なし'} - </div> - <div> - 相手のスコア: {opponentScore ?? 'なし'} - </div> + <div>{resultText}</div> + <div>あなたのスコア: {yourScore ?? "なし"}</div> + <div>相手のスコア: {opponentScore ?? "なし"}</div> </div> </> ); -} +}; |
