-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: more experimenting with changes
- Loading branch information
Showing
5 changed files
with
70 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
Slice: activeAttempt, apiErrorMsg | ||
In ExamStateProviders, needs to be moved to slice: showTimer, | ||
Thunks, which need to be imported instead: stopExam, submitExam, expireExam, pollAttempt, pingAttempt, getLatestAttemptData, | ||
Check failure on line 4 in src/data/selectors.js GitHub Actions / tests
|
||
*/ | ||
|
||
// TODO: Perhaps name the slice 'name:' var to 'currentExam', | ||
// or change the one in frontend-app-exams-dashboard to 'examsList' or something. | ||
|
||
/* | ||
I got this error: | ||
OuterExamTimer › is successfully rendered and shows timer if there is an exam in progress | ||
TypeError: Cannot read properties of undefined (reading 'activeAttempt') | ||
7 | // TODO: Perhaps name the slice 'name:' var to 'currentExam', | ||
8 | // or change the one in frontend-app-exams-dashboard to 'examsList' or something. | ||
> 9 | export const activeAttempt = state => state.exam.activeAttempt; | ||
| ^ | ||
10 | export const apiErrorMsg = state => state.exam.apiErrorMsg; | ||
11 | export const showTimer = state => state.exam.showTimer; | ||
Why isn't the selector working? | ||
*/ | ||
export const activeAttempt = state => state.examState.activeAttempt; | ||
export const apiErrorMsg = state => state.examState.apiErrorMsg; | ||
export const showTimer = state => state.examState.showTimer; | ||
|
||
Check failure on line 29 in src/data/selectors.js GitHub Actions / tests
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters