Compare commits

..

5 Commits

Author SHA1 Message Date
sundasnoreen12
ed31b5faa2 refactor: removed my added commented line and also optimized the code to get stats for section 2023-02-21 12:31:44 +05:00
sundasnoreen12
04719045a5 refactor: v3 topics unit test cases 2023-02-21 12:31:44 +05:00
sundasnoreen12
42a24cf1d1 refactor: v3 topics unit test cases 2023-02-21 12:31:44 +05:00
sundasnoreen12
16d727b104 refactor: v3 topics unit test cases 2023-02-21 12:31:44 +05:00
sundasnoreen12
7d7292a17d test: added test cases for v3 Topics and units list page 2023-02-21 12:31:44 +05:00
2 changed files with 3 additions and 11 deletions

View File

@@ -13,12 +13,12 @@ const defaultSanitizeOptions = {
};
function HTMLLoader({
htmlNode, componentId, cssClassName, testId, delay,
htmlNode, componentId, cssClassName, testId,
}) {
const sanitizedMath = DOMPurify.sanitize(htmlNode, { ...defaultSanitizeOptions });
const previewRef = useRef();
const debouncedPostContent = useDebounce(htmlNode, delay);
const debouncedPostContent = useDebounce(htmlNode, 500);
useEffect(() => {
let promise = Promise.resolve(); // Used to hold chain of typesetting calls
@@ -45,7 +45,6 @@ HTMLLoader.propTypes = {
componentId: PropTypes.string,
cssClassName: PropTypes.string,
testId: PropTypes.string,
delay: PropTypes.number,
};
HTMLLoader.defaultProps = {
@@ -53,7 +52,6 @@ HTMLLoader.defaultProps = {
componentId: null,
cssClassName: '',
testId: '',
delay: 0,
};
export default HTMLLoader;

View File

@@ -29,13 +29,7 @@ function PostPreviewPane({
className="float-right p-3"
iconClassNames="icon-size"
/>
<HTMLLoader
htmlNode={htmlNode}
cssClassName="text-primary"
componentId="post-preview"
testId="post-preview"
delay={500}
/>
<HTMLLoader htmlNode={htmlNode} cssClassName="text-primary" componentId="post-preview" testId="post-preview" />
</div>
)}
<div className="d-flex justify-content-end">