Fix project modal

This commit is contained in:
Daniel Kluge 2022-06-12 16:11:03 +02:00
parent 8f6de1ce33
commit 61a9481ddf

View File

@ -25,11 +25,12 @@ const ProjectModal: NextPage = () => {
const containerRef = useRef<HTMLDivElement>(null); const containerRef = useRef<HTMLDivElement>(null);
useEffect(() => { /*useEffect(() => {
console.log(content);
if (content && containerRef.current) { if (content && containerRef.current) {
containerRef.current.innerHTML = content; containerRef.current.innerHTML = content;
} }
}, [content]); }, [content]);*/
if (!visible) return <></>; if (!visible) return <></>;
@ -43,7 +44,7 @@ const ProjectModal: NextPage = () => {
// If diaryPages // If diaryPages
// Show page selector // Show page selector
} }
<div className={`${styles.modalText} asciidoc`} ref={containerRef}> <div className={`${styles.modalText} asciidoc`} ref={containerRef} dangerouslySetInnerHTML={{__html: content ? content : projectEmpty}}>
</div> </div>
</div> </div>