Skip to content

Commit

Permalink
cotuongpc1: update currentRoundIndex disabling logic
Browse files Browse the repository at this point in the history
  • Loading branch information
quyettvq committed Aug 15, 2024
1 parent c2275b1 commit 7e53370
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
16 changes: 8 additions & 8 deletions src/cotuongpc1/CoTuongPc1.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ export let CoTuongPc1 = () => {
}

let currentRoundIndex = -1;
let currentDate = dateStringify(new Date());
for (let r = 0; r < R; r++) {
let {startDate, endDate} = rounds[r];
if (isDateInRange(currentDate, startDate, endDate)) {
currentRoundIndex = r;
break;
}
}
// let currentDate = dateStringify(new Date());
// for (let r = 0; r < R; r++) {
// let {startDate, endDate} = rounds[r];
// if (isDateInRange(currentDate, startDate, endDate)) {
// currentRoundIndex = r;
// break;
// }
// }

return (
<div class="CoTuongPc1">
Expand Down
7 changes: 2 additions & 5 deletions src/cotuongpc1/ranking-table/RankingTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import {TableResponsive} from '../table-responsive/TableResponsive';
import {createMatchId, getGameScore, getMatchResult, roundNameAt} from '../utils';

let isRoundReadyForRanking = (roundIndex, currentRoundIndex) => {
// No filters
return true;

if (currentRoundIndex < 0) {
return true;
}
Expand Down Expand Up @@ -183,9 +180,9 @@ export let RankingTable = ({players, matches, matchesById, matchSchedules, curre

return (
<div class="RankingTable">
{/*currentRoundIndex >= 0 && (
{currentRoundIndex >= 0 && (
<p>BXH tính đến vòng {roundNameAt(currentRoundIndex)} đang diễn ra</p>
)*/}
)}
<TableResponsive>
<table>
<thead>
Expand Down

0 comments on commit 7e53370

Please sign in to comment.