import 'prism-sentry/index.css'; import {useEffect, useRef} from 'react'; import styled from '@emotion/styled'; import beautify from 'js-beautify'; import Prism from 'prismjs'; type Props = { code: string; }; function HTMLCode({code}: Props) { const codeRef = useRef(null); const formattedCode = beautify.html(code, {indent_size: 2}); useEffect(() => { Prism.highlightElement(codeRef.current, false); }, []); return (
        
          {formattedCode}
        
      
); } const CodeWrapper = styled('div')` line-height: 1.5; pre { word-break: break-all; white-space: pre-wrap; } `; export default HTMLCode;