-
-
- |
-
- 0
- ? {
- width: `${Math.round(
- (nrVotes / maxVotesPerDifficulty) * 100
- )}%`,
+ {difficultyVotes.length > 0 && (
+ <>
+
+
+ {Object.entries(nrVotesPerDifficulty).map(
+ ([difficulty, nrVotes]) => (
+
+
+
+ |
+
+ 0
+ ? {
+ width: `${Math.round(
+ (nrVotes / maxVotesPerDifficulty) * 100
+ )}%`,
+ }
+ : {}
}
- : {}
+ >
+
+
+ {nrVotes !== maxVotesPerDifficulty &&
+ pluralizeNoun("glas", nrVotes)}
+
+
+ |
+
+ {nrVotes === maxVotesPerDifficulty &&
+ pluralizeNoun("glas", nrVotes)}
+ |
+
+ )
+ )}
+
+
+
+
+ {difficultyVotes.map((vote) => (
+
-
-
- {nrVotes !== maxVotesPerDifficulty &&
- pluralizeNoun("glas", nrVotes)}
-
-
-
-
- {nrVotes === maxVotesPerDifficulty &&
- pluralizeNoun("glas", nrVotes)}
- |
-
- ))}
-
-
-
-
- {difficultyVotes.map((vote) => (
-
-
-
- |
-
- {vote.isBase ? "(bazna ocena)" : vote.user?.fullName}
- |
- {displayDate(vote.created)} |
-
- ))}
-
-
+ >
+ |
+
+ |
+
+ {vote.isBase ? "(bazna ocena)" : vote.user?.fullName}
+ |
+ {displayDate(vote.created)} |
+
+ ))}
+