-
-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented submit-feature #341
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- please update README.md as well
- make it configurable
Submit | ||
</button> | ||
</div> | ||
:null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply use &&
<div style={{display:'flex', justifyContent: 'space-between'}}> | ||
{ | ||
!endQuiz? | ||
<div style={{ display: 'flex',marginRight:'auto'}}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use inline styles
<div style={{ display: 'flex',marginRight:'auto'}}> | ||
<button | ||
onClick={() => {submitQuiz()}} | ||
style={{ display: 'flex', justifyContent: 'center', backgroundColor: 'green',color:'white' }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use inline styles
const submitQuiz = () => { | ||
setIsRunning(false); | ||
setEndQuiz(true); | ||
getUnansweredQuestions(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code is same as handleTimeUp
. don't duplicate it. revise the function and use for both case.
@rohith1222004 are you still interested in finishing this? Can you include a screenshot like #56 (comment) in the PR as well? And if you could make the submit early button configurable: optional (off by default, set some kind of flag to turn it on) and so the caller can decide what to call the submit early button. "Quit" or "Exit" or whatever, depending on the context. Also style wise it should probably look the same as the existing buttons, just copy the relevant classes I'm guessing. Let me know if you need any help with the suggestions. |
Closes #56