mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(client): fix typo in useState variable name in progress-inner.tsx (#61431)
This commit is contained in:
@@ -39,7 +39,7 @@ function ProgressInner({
|
||||
meta
|
||||
}: ProgressInnerProps): JSX.Element {
|
||||
const [shownPercent, setShownPercent] = useState(0);
|
||||
const [lastShopwnPercent, setLastShownPercent] = useState(0);
|
||||
const [lastShownPercent, setLastShownPercent] = useState(0);
|
||||
const progressInnerWrap = useRef<HTMLDivElement>(null);
|
||||
const isProgressInViewport = useIsInViewport(progressInnerWrap);
|
||||
|
||||
@@ -66,7 +66,7 @@ function ProgressInner({
|
||||
}, intervalLength);
|
||||
};
|
||||
useEffect(() => {
|
||||
if (lastShopwnPercent !== completedPercent && isProgressInViewport) {
|
||||
if (lastShownPercent !== completedPercent && isProgressInViewport) {
|
||||
setLastShownPercent(completedPercent);
|
||||
animateProgressInner(completedPercent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user