Skip to content

Commit

Permalink
Merge pull request #1162 from ita-social-projects/develop
Browse files Browse the repository at this point in the history
Update master 23.02 11:30 pm
  • Loading branch information
Oleh-Kril authored Feb 23, 2024
2 parents ab8189b + f44f269 commit 2f69b95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/app/stores/streetcode-page-loader-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export default class StreetcodePageLoaderStore {
this.loadedBlocks += 1;
}

public resetLoadedBlocks() {
this.loadedBlocks = 0;
}

get isPageLoaded():boolean {
return this.loadedBlocks >= this.allBlocks;
}
Expand Down
2 changes: 2 additions & 0 deletions src/features/StreetcodePage/Streetcode.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ const StreetcodeContent = () => {
toStreetcodeRedirectClickEvent(streetcodeUrl.current, fromPage);
clearWindowHistoryState();
}

return () => pageLoadercontext.resetLoadedBlocks();
}, []);

return (
Expand Down

0 comments on commit 2f69b95

Please sign in to comment.