Skip to content

Commit

Permalink
Refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
lilia1891 committed Nov 27, 2024
1 parent 64998ab commit c48b117
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions components/contentblocks/IndicatorGroupBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,12 @@ type Props = {
// TODO: Format as list for a11y
const IndicatorGroupBlock = ({ id = '', title, indicators }: Props) => {
const t = useTranslations();

const displayHeader = title && title !== '-' ? title : t('indicators');
const displayHeader = title === '-' ? null : title || t('indicators');

return (
<IndicatorGraphSection id={id}>
<Container>
{displayHeader && displayHeader !== '-' ? (
<SectionHeader>{displayHeader}</SectionHeader>
) : null}
{displayHeader ? <SectionHeader>{displayHeader}</SectionHeader> : null}
<StyledRow className="justify-content-center">
{indicators.map((item) => (
<IndicatorItem
Expand Down

0 comments on commit c48b117

Please sign in to comment.