- return (
- <div className="result">
- <Box user={participant.user} />
- <div className="status">
- <span className="time">
- {result && maySeeResults(user, tournament, round) ?
- formatTime(result)
- : null}
- </span>
- {result && result.has_finished ?
- <Icon.FINISHED size="lg" />
- :
- <Icon.PENDING size="lg" />
- }
- </div>
- </div>
- );
+ const maySee = maySeeResults(user, tournament, round);
+ return <div className="result">
+ <Box user={participant.user} />
+ <Button
+ className={getClassName(result)}
+ onClick={() => setShowDialog(true)}
+ title={maySee && result && result.comment ? result.comment : null}
+ >
+ <span className="time">
+ {getTime(result, maySee)}
+ </span>
+ {getIcon(result, maySee)}
+ </Button>
+ <DetailDialog
+ onHide={() => setShowDialog(false)}
+ participant={participant}
+ round={round}
+ show={showDialog}
+ tournament={tournament}
+ />
+ </div>;