diff --git a/src/pages/write/index.tsx b/src/pages/write/index.tsx index fd9d12c..36d415e 100644 --- a/src/pages/write/index.tsx +++ b/src/pages/write/index.tsx @@ -7,7 +7,8 @@ import { } from 'react-router-dom' import { CheckboxFieldUncontrolled, - InputFieldUncontrolled + InputFieldUncontrolled, + InputFieldWithImageUpload } from '../../components/Inputs' import { ProfileSection } from '../../components/ProfileSection' import { useAppSelector } from '../../hooks' @@ -29,8 +30,11 @@ export const WritePage = () => { const blog = data?.blog const title = data?.blog ? 'Edit blog post' : 'Submit a blog post' const [content, setContent] = useState(blog?.content || '') + const [featuredImageUrl, setfeaturedImageUrl] = useState(blog?.image || '') + const formRef = useRef(null) const editorRef = useRef(null) + const [showConfirmPopup, setShowConfirmPopup] = useState(false) const handleReset = () => { setShowConfirmPopup(true) @@ -97,12 +101,14 @@ export const WritePage = () => { readOnly /> - setfeaturedImageUrl(value)} />