From d0d17dbf165c2757c77bee1c86e481d3c5abf244 Mon Sep 17 00:00:00 2001 From: sltsheryl Date: Sat, 29 Jul 2023 13:12:47 +0800 Subject: [PATCH] Fix form bug --- components/student/Dashboard.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/components/student/Dashboard.js b/components/student/Dashboard.js index 261764e..aec1dc8 100644 --- a/components/student/Dashboard.js +++ b/components/student/Dashboard.js @@ -1030,23 +1030,20 @@ const SubmissionForm = ({ close(); }; - if (isUpdate) { - if (!editing) { + if (isUpdate) { if (!task.is_group) { return ( ); } - } - else { + } else { return (

Submit

@@ -1070,13 +1067,15 @@ const SubmissionForm = ({ name="description" />
- {!task.is_group &&
- setFileInput(e.target.files[0])} - /> -
} + {!task.is_group && ( +
+ setFileInput(e.target.files[0])} + /> +
+ )}