Skip to content

Commit

Permalink
Changed order of html and title in hero
Browse files Browse the repository at this point in the history
  • Loading branch information
schaerta committed Jul 12, 2024
1 parent 5d35e73 commit d1e39fc
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions components/Hero/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ export const Hero = ({
/>
</div>
)}
{heroTitle && <h1 className={cN(s.title, s.titles)}>{heroTitle}</h1>}
{heroSubTitle && (
<h3 className={cN(s.subTitle, s.titles)}>{heroSubTitle}</h3>
)}
{/* 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>
)}

</section>
);
};

0 comments on commit d1e39fc

Please sign in to comment.