Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ export const AnswersList: React.FC<AnswersListProps> = ({
contest.presentation?.collapsible_lists ?? ECollapsibleLists.DISABLED
const isCollapsible = collapsibleListsPolicy !== ECollapsibleLists.DISABLED
const defaultExpanded = collapsibleListsPolicy !== ECollapsibleLists.ENABLED_COLLAPSED
const collapseToggleAriaLabel = t("candidatesList.collapseToggle", {listTitle: title})
const showCandidatesLabel = t("candidatesList.showCandidates")
const hideCandidatesLabel = t("candidatesList.hideCandidates")
const categoryCandidateIds = new Set(category.candidates.map((candidate) => candidate.id))
Expand Down Expand Up @@ -159,7 +158,11 @@ export const AnswersList: React.FC<AnswersListProps> = ({
let listPresentation = contest.presentation?.types_presentation?.[title] ?? {
name: title,
}
listPresentation.name = title
const listTitle =
translate(category.header, "name", i18n.language) ??
translate(listPresentation, "name", i18n.language) ??
title
const collapseToggleAriaLabel = t("candidatesList.collapseToggle", {listTitle})
let subtypesPresentation = Object.entries(listPresentation.subtypes_presentation ?? {}).map(
([key, value]) => {
value.name = key
Expand All @@ -174,7 +177,7 @@ export const AnswersList: React.FC<AnswersListProps> = ({

return (
<CandidatesList
title={translate(listPresentation, "name", i18n.language) ?? title}
title={listTitle}
isActive={!isReview && isActive}
isCheckable={checkableLists}
checked={isChecked()}
Expand Down