Create assignment page (Tutor)#25
Conversation
WillCWX
left a comment
There was a problem hiding this comment.
Good work
There are some comments regarding the handling of inputs.
Do you have a way to handle the submission? It seems that the inputs are not controlled so you can't submit the values directly. There is no overall <form> also so I'm not sure how submission will work.
7be5192 to
1db9c54
Compare
|
Issues have been resolved. |
WillCWX
left a comment
There was a problem hiding this comment.
Looks good to me!
Just change {AssignmentCreator()} to <AssignmentCreator /> and fix the merge conflicts.
We may need to breakdown the pages into smaller components soon but this should be fine for now.
| return ( | ||
| <div className="columns-auto items-center p-12"> | ||
| <h1 className="font-bold text-4xl text-center">Assignment Creation</h1> | ||
| {AssignmentCreator()} |
There was a problem hiding this comment.
| {AssignmentCreator()} | |
| <AssignmentCreator /> |
Calling Components as a function may have unintended side effects, it is better to use < > so that react understands and renders this as component
| <body className={inter.className + " min-h-screen"}> | ||
| <Providers> | ||
| <div className="flex flex-row justify-start"> | ||
| <div className="h-screen flex flex-row justify-start"> |
There was a problem hiding this comment.
i think you have some conflicts with master that vivien just merged in
| /> | ||
| <Button className="w-1/3" color="primary" onClick={handleSubmit}>Create Assignment</Button> | ||
| </div> | ||
| {renderQuestionUploads()} |
There was a problem hiding this comment.
This one is ok as it is a render (no react hooks)
|
|
||
| return ( | ||
| <div> | ||
| {renderPreview()} |
There was a problem hiding this comment.
This one is ok as it is a render (no react hooks)
|
@junhonglow can you fix the build error in frontend? You may see the errors by running |
Description
Create the frontend page under /assignments/create route that will display a page for tutors to create an assignment. There is currently no limit on the number of questions that can be created for an assignment.
Related Issue(s)
Partially completes #3, will close after PR #24 is merged as well.
Screenshots
Additional Notes
Added a change to layout, currently if the components exceeded the scroll height of the window, the background would revert back to black.
There's a supposed issue that is linked with the input type for date and time for Next UI that has supposedly been fixed in v2.1.17 but not sure why it's still occurring. Either way, I have a workaround but it is not the best looking.
TO-DO