Skip to content

Commit 067259a

Browse files
authored
Fjerner heading aktuelle situasjoner hvis tom (#2185)
1 parent 1b8f801 commit 067259a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/_common/relatedSituations/RelatedSituations.tsx

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,18 @@ export const RelatedSituations = ({ relatedSituations, title, description }: Pro
3131

3232
const getStringPart = translator('related', language);
3333
const defaultTitle = getStringPart('otherOffers');
34-
const actualTitle = title || defaultTitle;
34+
const actualTitle = (title || defaultTitle).trim(); //Redaktører legger inn et mellomrom hvis de ikke vil ha tittel
3535

3636
return (
3737
<div
3838
className={classNames(style.relatedSituations, editorView === 'edit' && style.noMargin)}
3939
id={getAnchorId(actualTitle)}
4040
>
41-
<Heading level="3" size="medium" spacing>
42-
{actualTitle}
43-
</Heading>
41+
{actualTitle && (
42+
<Heading level="3" size="medium" spacing>
43+
{actualTitle}
44+
</Heading>
45+
)}
4446
<BodyLong className={style.description}>
4547
{description || getStringPart('moreInformation')}
4648
</BodyLong>

0 commit comments

Comments
 (0)