File tree Expand file tree Collapse file tree 1 file changed +5
-12
lines changed
packages/component/src/Attachment Expand file tree Collapse file tree 1 file changed +5
-12
lines changed Original file line number Diff line number Diff line change 55
66import classNames from 'classnames' ;
77import PropTypes from 'prop-types' ;
8- import React , { useMemo } from 'react' ;
8+ import React from 'react' ;
99
10- import ScreenReaderText from '../ScreenReaderText' ;
1110import useRenderMarkdownAsHTML from '../hooks/useRenderMarkdownAsHTML' ;
12- import useStripMarkdown from '../hooks/internal/useStripMarkdown' ;
1311import useStyleSet from '../hooks/useStyleSet' ;
1412
1513const TextContent = ( { contentType, text } ) => {
1614 const [ { textContent : textContentStyleSet } ] = useStyleSet ( ) ;
1715 const renderMarkdownAsHTML = useRenderMarkdownAsHTML ( ) ;
1816 const contentTypeMarkdown = contentType === 'text/markdown' ;
19- const textAlt = useStripMarkdown ( contentTypeMarkdown && text ) ;
2017
2118 return contentTypeMarkdown && renderMarkdownAsHTML ? (
22- < React . Fragment >
23- < ScreenReaderText text = { textAlt } />
24- < div
25- aria-hidden = { true }
26- className = { classNames ( 'markdown' , textContentStyleSet + '' ) }
27- dangerouslySetInnerHTML = { { __html : renderMarkdownAsHTML ( text || '' ) } }
28- />
29- </ React . Fragment >
19+ < div
20+ className = { classNames ( 'markdown' , textContentStyleSet + '' ) }
21+ dangerouslySetInnerHTML = { { __html : renderMarkdownAsHTML ( text || '' ) } }
22+ />
3023 ) : (
3124 ( text || '' ) . split ( '\n' ) . map ( ( line , index ) => (
3225 < p className = { classNames ( 'plain' , textContentStyleSet + '' ) } key = { index } >
You can’t perform that action at this time.
0 commit comments