Skip to content

Commit

Permalink
Fix single column override in scramble view
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorbg committed Oct 24, 2024
1 parent ffc8082 commit 3ba167a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/webpacker/components/ResultsData/Scrambles/ScrambleRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import { editScrambleUrl } from '../../../lib/requests/routes.js.erb';
import '../../../stylesheets/competition_results.scss';

function ScrambleRow({
scramble, scrambles, adminMode, extraOverride = false,
scramble, scrambles, adminMode, singleRowOverride = false,
}) {
const {
scrambleId, isExtra, groupId, scrambleNum, scramble: scrambleString,
} = scramble;

return (
<Table.Row>
{scrambleNum === 1 && (!isExtra || extraOverride)
{(singleRowOverride || (scrambleNum === 1 && !isExtra))
&& <Table.Cell textAlign="center" rowSpan={scrambles.length}>{groupId}</Table.Cell>}
<Table.Cell>
{isExtra ? 'Extra ' : ''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function SingleScrambleRow({
dataItems,
}) {
return (
<ScrambleRow scramble={dataItem} scrambles={dataItems} adminMode={false} extraOverride />
<ScrambleRow scramble={dataItem} scrambles={dataItems} adminMode={false} singleRowOverride />
);
}

Expand Down

0 comments on commit 3ba167a

Please sign in to comment.