Sort matches on fullscreen page by position as well

This commit is contained in:
Daniel Schädler 2023-09-15 15:23:51 +02:00
parent 21e6a858c6
commit 3c4a77bbeb
No known key found for this signature in database
1 changed files with 4 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import {
Spinner
} from 'reactstrap';
import {Match} from '../js/components/Match';
import {sortMatchesByPositionAscending} from '../js/utils/sorting';
function FullscreenPage(props) {
@ -27,7 +28,9 @@ function Matches(props) {
matches = (<div className='text-center text-secondary font-italic'>keine Matches</div>);
} else {
matches = (<Row>
{props.matches.map(match => <Col md='auto'><Match key={match.id} match={match}/></Col>)}
{props.matches.sort(sortMatchesByPositionAscending()).map(
match => <Col md='auto'><Match key={match.id} match={match}/></Col>
)}
</Row>);
}
return (<div className='mx-4 h5'>