Skip to content

Commit

Permalink
chore: update progress bar url logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leangseu-edx committed Oct 30, 2023
1 parent fffc94d commit 4ee8daa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/components/ProgressBar/hooks.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { useParams } from 'react-router-dom';
import { useActiveView, useIsEmbedded } from 'hooks';
import {
useStepState,
useEffectiveGrade,
useGlobalState,
} from 'data/services/lms/hooks/selectors';
Expand All @@ -12,13 +11,13 @@ import {
} from 'data/services/lms/constants';

export const useProgressStepData = ({ step, canRevisit = false }) => {
const { xblockId } = useParams();
const { xblockId, courseId } = useParams();
const isEmbedded = useIsEmbedded();
const activeView = useActiveView();
const viewStep = routeSteps[activeView];
const { activeStepName, stepState } = useGlobalState({ step });
const { stepState } = useGlobalState({ step });

const href = `/${stepRoutes[step]}${isEmbedded ? '/embedded' : ''}/${xblockId}`;
const href = `/${stepRoutes[step]}${isEmbedded ? '/embedded' : ''}/${courseId}/${xblockId}`;
const isActive = viewStep === step;
const isEnabled = (
isActive
Expand Down

0 comments on commit 4ee8daa

Please sign in to comment.