Make tooltip voter order backend-driven
This commit is contained in:
@@ -138,13 +138,9 @@ function formatMyVote(score, tooltip) {
|
||||
|
||||
function buildVotersTooltip(result) {
|
||||
const voterNames = Array.isArray(result?.voterNames)
|
||||
? result.voterNames
|
||||
.filter(
|
||||
? result.voterNames.filter(
|
||||
(name) => typeof name === "string" && name.trim().length > 0,
|
||||
)
|
||||
.sort((a, b) =>
|
||||
a.localeCompare(b, undefined, { sensitivity: "base" }),
|
||||
)
|
||||
: [];
|
||||
if (voterNames.length === 0) return t("results.votersTooltipEmpty");
|
||||
return t("results.votersTooltip", { users: voterNames.join(", ") });
|
||||
|
||||
Reference in New Issue
Block a user