: dateStr;
};
+const getEntryRoundNumber = entry =>
+ (entry && entry.details && entry.details.round && entry.details.round.number) || '?';
+
const getEntryResultTime = entry => {
if (!entry || !entry.details || !entry.details.result) return 'ERROR';
const result = entry.details.result;
}
case 'round.create':
case 'round.lock':
+ case 'round.unlock':
+ return i18n.t(
+ `protocol.description.${entry.type}`,
+ {
+ ...entry,
+ number: getEntryRoundNumber(entry),
+ },
+ );
+ case 'result.comment':
case 'tournament.lock':
return i18n.t(
`protocol.description.${entry.type}`,
const getEntryIcon = entry => {
switch (entry.type) {
+ case 'result.report':
+ return <Icon.RESULT />;
+ case 'round.create':
+ return <Icon.ADD />;
+ case 'round.lock':
+ case 'tournament.lock':
+ return <Icon.LOCKED />;
+ case 'round.unlock':
+ return <Icon.UNLOCKED />;
default:
return <Icon.PROTOCOL />;
}