X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=resources%2Fjs%2Fcomponents%2Ftournament%2FScoreboard.js;h=40ad82ff300724acda076a5f7038d1546b723c5e;hb=a439a2eb428e8f881fd6ed6309e600a664c9b3de;hp=ea6a6668727385e2165dcc44ab1d2f853e1940d0;hpb=6c3125ca01833f7cec3659353840dbe1ddfb0fc6;p=alttp.git
diff --git a/resources/js/components/tournament/Scoreboard.js b/resources/js/components/tournament/Scoreboard.js
index ea6a666..40ad82f 100644
--- a/resources/js/components/tournament/Scoreboard.js
+++ b/resources/js/components/tournament/Scoreboard.js
@@ -5,52 +5,53 @@ import { withTranslation } from 'react-i18next';
import Icon from '../common/Icon';
import Box from '../users/Box';
-import { calculateScores } from '../../helpers/Tournament';
+import { comparePlacement } from '../../helpers/Participant';
+import { getRunners } from '../../helpers/Tournament';
import { withUser } from '../../helpers/UserContext';
import i18n from '../../i18n';
-const getRowClassName = (tournament, score, user) => {
+const getRowClassName = (tournament, participant, user) => {
const classNames = ['score'];
- if (score && user && score.participant && score.participant.user_id == user.id) {
+ if (participant && user && participant.user_id == user.id) {
classNames.push('is-self');
}
return classNames.join(' ');
};
-const getPlacementDisplay = score => {
- if (score.placement === 1) {
+const getPlacementDisplay = participant => {
+ if (participant.placement === 1) {
return
{i18n.t('participants.placementShort')} | +{i18n.t('participants.placementShort')} | {i18n.t('participants.participant')} | {i18n.t('participants.scoreShort')} |
---|---|---|---|
- {getPlacementDisplay(score)} + {getPlacementDisplay(participant)} |
-
|
- {score.score} | +{participant.score} |