]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/techniques/Detail.js
short circuit tech links
[alttp.git] / resources / js / components / techniques / Detail.js
index d955397399668d86d2d030f01c9cb2de8fb6d3b0..303921c4c919245ed5c66da8e1a7f4357d976705 100644 (file)
@@ -4,15 +4,14 @@ import { Container } from 'react-bootstrap';
 import { withTranslation } from 'react-i18next';
 
 import Outline from './Outline';
+import RawHTML from '../common/RawHTML';
 import { getTranslation } from '../../helpers/Technique';
 import i18n from '../../i18n';
 
 const Detail = ({ technique }) => <Container as="article">
        <h1>{getTranslation(technique, 'title', i18n.language)}</h1>
        <Outline technique={technique} />
-       <div dangerouslySetInnerHTML={{
-               __html: getTranslation(technique, 'description', i18n.language),
-       }} />
+       <RawHTML html={getTranslation(technique, 'description', i18n.language)} />
        {technique.chapters ? technique.chapters.map(chapter =>
                <section id={`c${chapter.id}`} key={`c${chapter.id}`}>
                        {chapter.pivot.level ?
@@ -22,9 +21,7 @@ const Detail = ({ technique }) => <Container as="article">
                                        getTranslation(chapter, 'title', i18n.language),
                                )
                        : null}
-                       <div dangerouslySetInnerHTML={{
-                               __html: getTranslation(chapter, 'description', i18n.language),
-                       }} />
+                       <RawHTML html={getTranslation(chapter, 'description', i18n.language)} />
                </section>
        ) : null}
 </Container>;