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:
@ -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">
|
||||
|
Reference in New Issue
Block a user