Skip to content

Commit

Permalink
docs(routeprogressbar): clarify key usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Birkbjo committed May 19, 2023
1 parent afa8602 commit e92417f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/layout/progressbar/RouteProgressBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const RouteProgress = () => {
const location = useLocation();
const isLoading = navigation.state === LOADING_STATE;
// key is used to reset the state of the progress when location changes
// cannot use location.key directly since that will cancel the animation early (key and isLoading are updated at the same time)
const [keyIncrement, setKeyIncrement] = React.useState(0);

React.useEffect(() => {
Expand Down Expand Up @@ -49,7 +50,6 @@ export const RouteProgressBar = ({ isLoading }) => {
};

const ProgressBar = ({ progress }: { progress: number }) => {
console.log({ progress });
return (
<div
className={css.progressBar}
Expand Down

0 comments on commit e92417f

Please sign in to comment.