File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/data/services/lms/hooks Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import { camelCaseObject } from '@edx/frontend-platform';
5
5
6
6
import routes from 'routes' ;
7
7
import * as types from '../types' ;
8
- import { queryKeys } from '../constants' ;
8
+ import { routeSteps , queryKeys } from '../constants' ;
9
9
import fakeData from '../fakeData' ;
10
10
11
11
import { loadState } from '../fakeData/dataStates' ;
@@ -18,7 +18,8 @@ export const useORAConfig = (): types.QueryData<types.ORAConfig> => useQuery({
18
18
export const usePageData = ( ) : types . QueryData < types . PageData > => {
19
19
const location = useLocation ( ) ;
20
20
const view = location . pathname . split ( '/' ) [ 1 ] ;
21
- const { xblockId, progressKey } = useParams ( ) ;
21
+ const params = useParams ( ) ;
22
+ const progressKey = params . progressKey || routeSteps [ view ] ;
22
23
return useQuery ( {
23
24
queryKey : [ queryKeys . pageData ] ,
24
25
queryFn : ( ) => Promise . resolve ( camelCaseObject ( loadState ( {
You can’t perform that action at this time.
0 commit comments