diff --git a/pages/contributors.js b/pages/contributors.js index c031c57..7edce52 100755 --- a/pages/contributors.js +++ b/pages/contributors.js @@ -25,7 +25,7 @@ const CSV = () => { const [values, setValues] = useState([]); const [modalData, setModalData] = useState(""); const [showModal, setShowModal] = useState(false); - + const [ submission, setSubmission ] = useState(""); const [isEditing, setIsEditing] = useState(false); const [editingStudent, setEditingStudent] = useState(null); const [dataSource, setDataSource] = useState([ @@ -90,7 +90,7 @@ const CSV = () => { render: (record) => { return ( <> - {record !== ""? + {record !== "" ? handleModalOpen(record)}>View Submission : "No Submission" @@ -135,7 +135,7 @@ const CSV = () => { const handleModalOpen = (data) => { setModalData(data); - console.log("data", data) + console.log("data is", data) setShowModal(true); }; @@ -240,6 +240,7 @@ const CSV = () => { name: name, email: email, submitted: submitted, + submission: submission, // starts as an empty string notes: notes, }; @@ -274,7 +275,7 @@ const CSV = () => {