Skip to content

Commit

Permalink
Small adjustment for help sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
chamhayden committed Sep 7, 2023
1 parent a5e952b commit 830e3f4
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions frontend/src/component/SetOfTables.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,18 @@ const SetOfTables = ({ boxes, lectures }) => {
<TableBody>
{table.map((tableRow, tableRowKey) => {
hasLectures = true
var curDuration = parseInt(tableRow[3].value.replace(/^\D+/g, ''))
if (window.location.href.includes('tutorial')) {
curDuration = parseInt(tableRow[2].value.replace(/^\D+/g, ''))
console.log('tableRow', tableRow);
if (!window.location.href.includes('help-session')) {
var curDuration = parseInt(tableRow[3].value.replace(/^\D+/g, ''))
if (window.location.href.includes('tutorial')) {
curDuration = parseInt(tableRow[2].value.replace(/^\D+/g, ''))
}
if (tableRowKey === 0) {
durationCount = curDuration
} else if (!lectures || shouldShowImportance(tableRow)) {
durationCount += curDuration
}
}
if (tableRowKey === 0) {
durationCount = curDuration
} else if (!lectures || shouldShowImportance(tableRow)) {
durationCount += curDuration
}
return (
<TableRow
key={tableRowKey}
Expand Down

0 comments on commit 830e3f4

Please sign in to comment.