Skip to content

Commit

Permalink
Merge pull request #45058 from code-dot-org/maureen/LP-2180-progress-…
Browse files Browse the repository at this point in the history
…pill-updates

ProgressPill uses bubble url helper
  • Loading branch information
maureensturgeon committed Feb 25, 2022
2 parents 36ddc80 + 47acfc7 commit 71056c4
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions apps/src/templates/progress/ProgressPill.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import FontAwesome from '../FontAwesome';
import color from '@cdo/apps/util/color';
import {levelWithProgressType} from './progressTypes';
import {levelProgressStyle, hoverStyle} from './progressStyles';
import {stringifyQueryParams} from '../../utils';
import {queryParams} from '@cdo/apps/code-studio/utils';
import {isLevelAssessment} from './progressHelpers';
import {connect} from 'react-redux';
import {ReviewStates} from '@cdo/apps/templates/feedback/types';
import BubbleBadge, {BadgeType} from '@cdo/apps/templates/progress/BubbleBadge';
import {
BubbleShape,
BubbleSize
BubbleSize,
getBubbleUrl
} from '@cdo/apps/templates/progress/BubbleFactory';

/**
Expand Down Expand Up @@ -50,19 +50,8 @@ class ProgressPill extends React.Component {
return;
}

let url = levels[0].url;
let params = {};

if (selectedSectionId) {
params['section_id'] = selectedSectionId;
}

const userId = queryParams('user_id');
if (userId) {
params['user_id'] = userId;
}

return (url += stringifyQueryParams(params));
return getBubbleUrl(levels[0].url, userId, selectedSectionId);
}

getTooltipProps() {
Expand Down

0 comments on commit 71056c4

Please sign in to comment.