Skip to content

Commit

Permalink
fix: user progress modal percentage
Browse files Browse the repository at this point in the history
  • Loading branch information
arikchakma committed Jan 20, 2025
1 parent 22f29a1 commit 9165510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/UserProgress/UserProgressModalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ export function UserProgressModalHeader(props: UserProgressModalHeaderProps) {

const userProgressTotal = progress?.total || 0;
const userDone = progress?.done?.length || 0;
const userSkipped = progress?.skipped?.length || 0;
const progressPercentage =
Math.round((userDone / userProgressTotal) * 100) || 0;
Math.round(((userDone + userSkipped) / userProgressTotal) * 100) || 0;
const userLearning = progress?.learning?.length || 0;
const userSkipped = progress?.skipped?.length || 0;

return (
<div className="p-4">
Expand Down

0 comments on commit 9165510

Please sign in to comment.