X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=sidebyside;f=resources%2Fjs%2Fcomponents%2Fresults%2FItem.js;h=84395222407e1d50854e283a282a31002b73a328;hb=82b95e7542824bcdf4f1b245559cb1c93f4eafdd;hp=d99d93f75eea34eca456b0d668127f28038ef85b;hpb=80befc9403845a0f41f5f7e766938b0bbf607d7e;p=alttp.git
diff --git a/resources/js/components/results/Item.js b/resources/js/components/results/Item.js
index d99d93f..8439522 100644
--- a/resources/js/components/results/Item.js
+++ b/resources/js/components/results/Item.js
@@ -9,20 +9,20 @@ import { findResult } from '../../helpers/Participant';
import { maySeeResults } from '../../helpers/permissions';
import { withUser } from '../../helpers/UserContext';
-const getIcon = (result, index, maySee) => {
+const getIcon = (result, maySee) => {
if (!result || !result.has_finished) {
return ;
}
if (result.forfeit && maySee) {
return ;
}
- if (index === 0) {
+ if (result.placement === 1) {
return ;
}
- if (index === 1) {
+ if (result.placement === 2) {
return ;
}
- if (index === 2) {
+ if (result.placement === 3) {
return ;
}
return ;
@@ -42,7 +42,6 @@ const getTime = (result, maySee) => {
};
const Item = ({
- index,
participant,
round,
tournament,
@@ -56,13 +55,12 @@ const Item = ({
{getTime(result, maySee)}
- {getIcon(result, index, maySee)}
+ {getIcon(result, maySee)}
;
};
Item.propTypes = {
- index: PropTypes.number,
participant: PropTypes.shape({
user: PropTypes.shape({
}),