+const getClassName = (round, tournament, user) => {
+ const classNames = ['round'];
+ if (round.locked) {
+ classNames.push('is-locked');
+ } else {
+ classNames.push('is-unlocked');
+ }
+ if (isComplete(tournament, round)) {
+ classNames.push('is-complete');
+ } else {
+ classNames.push('is-incomplete');
+ }
+ if (hasFinishedRound(user, round)) {
+ classNames.push('has-finished');
+ } else if (isRunner(user, tournament)) {
+ classNames.push('has-not-finished');
+ }
+ return classNames.join(' ');
+};
+