Skip to content

Commit dddec96

Browse files
fix: load mock data
1 parent b9bf0b2 commit dddec96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/data/services/lms/hooks/data.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { camelCaseObject } from '@edx/frontend-platform';
55

66
import routes from 'routes';
77
import * as types from '../types';
8-
import { queryKeys } from '../constants';
8+
import { routeSteps, queryKeys } from '../constants';
99
import fakeData from '../fakeData';
1010

1111
import { loadState } from '../fakeData/dataStates';
@@ -18,7 +18,8 @@ export const useORAConfig = (): types.QueryData<types.ORAConfig> => useQuery({
1818
export const usePageData = (): types.QueryData<types.PageData> => {
1919
const location = useLocation();
2020
const view = location.pathname.split('/')[1];
21-
const { xblockId, progressKey } = useParams();
21+
const params = useParams();
22+
const progressKey = params.progressKey || routeSteps[view];
2223
return useQuery({
2324
queryKey: [queryKeys.pageData],
2425
queryFn: () => Promise.resolve(camelCaseObject(loadState({

0 commit comments

Comments
 (0)