+const getButtonLabel = (user, round) => {
+ const result = findResult(user, round);
+ if (round.locked) {
+ if (result && result.comment) {
+ return i18n.t('results.editComment');
+ } else {
+ return i18n.t('results.addComment');
+ }
+ } else {
+ if (result && (result.time || result.forfeit)) {
+ return i18n.t('results.edit');
+ } else {
+ return i18n.t('results.report');
+ }
+ }
+};
+
+const ReportButton = ({ round, user }) => {