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 Nov 2, 2023
1 parent da89ba3 commit 5ef0cdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 63 deletions.
59 changes: 0 additions & 59 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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 5ef0cdf

Please sign in to comment.