-
Notifications
You must be signed in to change notification settings - Fork 171
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
Added exam mode #3106
base: master
Are you sure you want to change the base?
Added exam mode #3106
Conversation
…ausing spinner to show
…s to Playground.tsx for GitHub and Google Drive buttons
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.
Just some minor nits :), thanks!
@@ -15,6 +16,7 @@ type Props = { | |||
|
|||
const DropdownCourses: React.FC<Props> = ({ isOpen, onClose, courses, courseId }) => { | |||
const navigate = useNavigate(); | |||
const enableExamMode = useTypedSelector(state => state.session.enableExamMode); |
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.
We can use useSession
for simplicity:
const enableExamMode = useTypedSelector(state => state.session.enableExamMode); | |
const { enableExamMode } = useSession(); |
src/pages/academy/Academy.tsx
Outdated
const { courseId } = useSession(); | ||
const { courseId: routeCourseIdStr } = useParams<{ courseId?: string }>(); | ||
const routeCourseId = routeCourseIdStr != null ? parseInt(routeCourseIdStr, 10) : undefined; | ||
const enableExamMode = useTypedSelector(state => state.session.enableExamMode); | ||
|
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.
useSession
is a wrapper around useTypedSelector(state => state.session)
among other things
const { courseId } = useSession(); | |
const { courseId: routeCourseIdStr } = useParams<{ courseId?: string }>(); | |
const routeCourseId = routeCourseIdStr != null ? parseInt(routeCourseIdStr, 10) : undefined; | |
const enableExamMode = useTypedSelector(state => state.session.enableExamMode); | |
const { courseId, enableExamMode } = useSession(); | |
const { courseId: routeCourseIdStr } = useParams<{ courseId?: string }>(); | |
const routeCourseId = routeCourseIdStr != null ? parseInt(routeCourseIdStr, 10) : undefined; | |
Pull Request Test Coverage Report for Build 14279159954Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
…n not an official course, remove exam mode toggle when creating new course
…nto pr/kah-seng/3106
…to report lost/regain of focus
…om navbar getting cropped
Description
Type of change
How to test
Checklist