diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index 8606cba8..446bfb13 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -1,5 +1,5 @@ import React, { - useContext, useEffect, useRef, useState, + useContext, useEffect, useRef, } from 'react'; import PropTypes from 'prop-types'; @@ -14,11 +14,10 @@ import { AppContext } from '@edx/frontend-platform/react'; import { Button, Card, Form, Spinner, StatefulButton, } from '@edx/paragon'; -import { Cancel, Help, Post } from '@edx/paragon/icons'; +import { Help, Post } from '@edx/paragon/icons'; import { TinyMCEEditor } from '../../../components'; import FormikErrorFeedback from '../../../components/FormikErrorFeedback'; -import HTMLLoader from '../../../components/HTMLLoader'; import { useDispatchWithState } from '../../../data/hooks'; import { selectCourseCohorts } from '../../cohorts/data/selectors'; import { fetchCourseCohorts } from '../../cohorts/data/thunks'; @@ -78,7 +77,6 @@ function PostEditor({ const history = useHistory(); const location = useLocation(); const commentsPagePath = useCommentsPagePath(); - const [showPreview, setShowPreview] = useState(false); const { courseId, topicId, @@ -363,14 +361,7 @@ function PostEditor({ /> - {!showPreview - ? - : ( -
- setShowPreview(false)} className="float-right" /> - -
- )} + {!editExisting && (