Skip to content

Commit

Permalink
Merge pull request #139 from grundeinkommensbuero/hamburg-setHTMLHero
Browse files Browse the repository at this point in the history
Update index.tsx
  • Loading branch information
joyponader authored Jul 10, 2024
2 parents 55786f2 + 841637f commit 5d35e73
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,13 @@ export const Hero = ({
/>
</div>
)}
{heroHTML && <div className={s.heroHTMLContainer}>{heroHTML}</div>}
{/* see https://legacy.reactjs.org/docs/dom-elements.html#dangerouslysetinnerhtml and https://blog.logrocket.com/using-dangerouslysetinnerhtml-react-application/ */}
{heroHTML && (
<div
className={s.heroHTMLContainer}
dangerouslySetInnerHTML={{ __html: heroHTML }}
/>
)}
{heroTitle && <h1 className={cN(s.title, s.titles)}>{heroTitle}</h1>}
{heroSubTitle && (
<h3 className={cN(s.subTitle, s.titles)}>{heroSubTitle}</h3>
Expand Down

0 comments on commit 5d35e73

Please sign in to comment.