Enhance Voting and Results screens to handle automatic song advances in bye rounds; update voting logic and remove submitter details

This commit is contained in:
2025-04-24 16:37:52 +02:00
parent 22eca7d4e0
commit 50e245233c
2 changed files with 59 additions and 13 deletions

View File

@ -119,13 +119,16 @@ const ResultsScreen = () => {
<div className="battles-list">
{lobby?.battles?.map((battle, index) => {
const isWinner = (battle.song1.id === battle.winner);
const song1VideoId = getYouTubeId(battle.song1.youtubeLink);
const song2VideoId = getYouTubeId(battle.song2.youtubeLink);
const song1VideoId = getYouTubeId(battle.song1?.youtubeLink);
const song2VideoId = battle.song2 ? getYouTubeId(battle.song2.youtubeLink) : null;
// Handle bye rounds
const isByeRound = battle.bye === true || !battle.song2;
return (
<div key={index} className="battle-item">
<div className="battle-header">
<h4>Round {battle.round + 1}, Battle {index + 1}</h4>
<h4>Round {battle.round + 1}, Battle {index + 1} {isByeRound ? "(Automatic Advance)" : ""}</h4>
</div>
<div className="battle-songs">