X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;ds=inline;f=resources%2Fjs%2Fcomponents%2Fresults%2FItem.js;h=2c1b65688416c6639925ef375d5255e7782a9d20;hb=0f171dfffd9c0c2cc895c9f282c5f4550844cc5a;hp=5cdd3be42751c1b678508a1e3800a065b080bf93;hpb=06fd14404164904304a20e2280037e83299247fa;p=alttp.git
diff --git a/resources/js/components/results/Item.js b/resources/js/components/results/Item.js
index 5cdd3be..2c1b656 100644
--- a/resources/js/components/results/Item.js
+++ b/resources/js/components/results/Item.js
@@ -9,7 +9,24 @@ import { findResult } from '../../helpers/Participant';
import { maySeeResults } from '../../helpers/permissions';
import { withUser } from '../../helpers/UserContext';
+const getIcon = (result, index) => {
+ if (!result || !result.has_finished) {
+ return ;
+ }
+ if (index === 0) {
+ return ;
+ }
+ if (index === 1) {
+ return ;
+ }
+ if (index === 2) {
+ return ;
+ }
+ return ;
+};
+
const Item = ({
+ index,
participant,
round,
tournament,
@@ -25,17 +42,14 @@ const Item = ({
formatTime(result)
: null}
- {result && result.has_finished ?
-
- :
-
- }
+ {getIcon(result, index)}
);
};
Item.propTypes = {
+ index: PropTypes.number,
participant: PropTypes.shape({
user: PropTypes.shape({
}),