From db85dc636b526f03f192bfb928dfed89f22252d8 Mon Sep 17 00:00:00 2001 From: zakie khan <121384625+zakie2003@users.noreply.github.com> Date: Sat, 14 Sep 2024 20:59:26 +0530 Subject: [PATCH 1/2] question photo edit fixed --- .../ReadyQuestionPaperDashboard.jsx | 8 -------- src/edit_question/EditQuestion.jsx | 8 +++++--- src/edit_ready_question/EditReadyQuestion.jsx | 16 +++++++++------- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/src/ReadyQuestionPaperDashboard/ReadyQuestionPaperDashboard.jsx b/src/ReadyQuestionPaperDashboard/ReadyQuestionPaperDashboard.jsx index 1e045cc..aa99abf 100644 --- a/src/ReadyQuestionPaperDashboard/ReadyQuestionPaperDashboard.jsx +++ b/src/ReadyQuestionPaperDashboard/ReadyQuestionPaperDashboard.jsx @@ -111,14 +111,6 @@ const ReadyQuestionPaperDashboard = () => { ))} - -
diff --git a/src/edit_ready_question/EditReadyQuestion.jsx b/src/edit_ready_question/EditReadyQuestion.jsx
index 5a68326..6eacb88 100644
--- a/src/edit_ready_question/EditReadyQuestion.jsx
+++ b/src/edit_ready_question/EditReadyQuestion.jsx
@@ -18,7 +18,7 @@ const EditReadyQuestion = () => {
const [questionDescription, setQuestionDescription] = useState(location.state.questionDescription);
const [compilerReq, setCompilerReq] = useState(location.state.compilerReq);
const [marks, setMarks] = useState(location.state.marks);
- const [image, setImage] = useState(null);
+ const [image, setImage] = useState(location.state.image);
const [loading, setLoading] = useState(false);
const [loadingSpinner,setLoadingSpinner] = useState(true);
const [modalIsOpen, setModalIsOpen] = useState(false);
@@ -27,7 +27,7 @@ const EditReadyQuestion = () => {
const navigate = useNavigate();
useEffect(()=>{setTimeout(()=>{setLoadingSpinner(false)},1000);},[]);
-
+ console.log(location.state);
const handleEditQuestion = async () => {
if (!questionheading || !questionDescription || !compilerReq || !marks) {
setModalMessage('Please fill in all the required fields.');
@@ -108,7 +108,7 @@ const EditReadyQuestion = () => {
onDrop,
maxSize: 10485760, // 10MB limit
});
-console.log(paperId);
+console.log(image);
return (
<>