const getEntryRoundNumber = entry =>
(entry && entry.details && entry.details.round && entry.details.round.number) || '?';
+const getEntryResultComment = entry => {
+ if (!entry || !entry.details || !entry.details.result || !entry.details.result.comment) {
+ return '';
+ }
+ return entry.details.result.comment;
+};
+
const getEntryResultTime = entry => {
if (!entry || !entry.details || !entry.details.result) return 'ERROR';
const result = entry.details.result;
username: getEntryDetailsUsername(entry),
},
);
+ case 'result.comment': {
+ const comment = getEntryResultComment(entry);
+ return <Trans i18nKey={`protocol.description.${entry.type}`}>
+ <Spoiler>{{comment}}</Spoiler>,
+ </Trans>;
+ }
case 'result.report': {
const time = getEntryResultTime(entry);
return <Trans i18nKey={`protocol.description.${entry.type}`}>
}
case 'round.create':
case 'round.lock':
+ case 'round.seed':
case 'round.unlock':
return i18n.t(
`protocol.description.${entry.type}`,
number: getEntryRoundNumber(entry),
},
);
- case 'result.comment':
case 'tournament.lock':
return i18n.t(
`protocol.description.${entry.type}`,