File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ import Constants from 'src/commons/utils/Constants';
9
9
import { useTypedSelector } from 'src/commons/utils/Hooks' ;
10
10
11
11
import {
12
- fetchGradingOverviews ,
13
12
fetchNotifications ,
14
13
updateLatestViewedCourse
15
14
} from '../../commons/application/actions/SessionActions' ;
@@ -33,7 +32,6 @@ const Academy: React.FC<{}> = () => {
33
32
const dispatch = useDispatch ( ) ;
34
33
React . useEffect ( ( ) => {
35
34
dispatch ( fetchNotifications ( ) ) ;
36
- dispatch ( fetchGradingOverviews ( false ) ) ;
37
35
} , [ dispatch ] ) ;
38
36
39
37
const agreedToResearch = useTypedSelector ( state => state . session . agreedToResearch ) ;
Original file line number Diff line number Diff line change 1
1
import { NonIdealState , Spinner , SpinnerSize } from '@blueprintjs/core' ;
2
2
import * as React from 'react' ;
3
+ import { useDispatch } from 'react-redux' ;
3
4
import { Navigate , useParams } from 'react-router' ;
5
+ import { fetchGradingOverviews } from 'src/commons/application/actions/SessionActions' ;
4
6
import { useTypedSelector } from 'src/commons/utils/Hooks' ;
5
7
import { numberRegExp } from 'src/features/academy/AcademyTypes' ;
6
8
@@ -16,6 +18,11 @@ const Grading: React.FC = () => {
16
18
questionId : string ;
17
19
} > ( ) ;
18
20
21
+ const dispatch = useDispatch ( ) ;
22
+ React . useEffect ( ( ) => {
23
+ dispatch ( fetchGradingOverviews ( false ) ) ;
24
+ } , [ dispatch ] ) ;
25
+
19
26
// If submissionId or questionId is defined but not numeric, redirect back to the Grading overviews page
20
27
if (
21
28
( params . submissionId && ! params . submissionId ?. match ( numberRegExp ) ) ||
You can’t perform that action at this time.
0 commit comments