Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progress Bar Component #99

Merged
merged 17 commits into from
Nov 30, 2023
Prev Previous commit
Next Next commit
remove console log
  • Loading branch information
zwkohn committed Aug 7, 2023
commit 39256e91d50b8fb6f382d71787c5b0c836cc603f
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export default function IncentiveBar(props: IncentiveBarProps) {
const earned = props.earned / props.increments;
const starWidthStr = containerRef != null ? window.getComputedStyle(containerRef!.current!).getPropertyValue('--star_size') : "0px";
const starWidth = parseInt(starWidthStr.substring(0, starWidthStr.length - 2));
console.log("starWidth", starWidthStr);
const spaceBetweenStars = (500 - (totalStars * starWidth)) / (totalStars - 1);
setCalculatedWidth((earned * (spaceBetweenStars + starWidth) + starWidth / 2) + "px");
}, [props.totalAvailable, props.increments, props.earned]);
Expand Down