diff --git a/src/app/stores/streetcode-page-loader-store.ts b/src/app/stores/streetcode-page-loader-store.ts index fbf39ce75..c46299e79 100644 --- a/src/app/stores/streetcode-page-loader-store.ts +++ b/src/app/stores/streetcode-page-loader-store.ts @@ -13,6 +13,10 @@ export default class StreetcodePageLoaderStore { this.loadedBlocks += 1; } + public resetLoadedBlocks() { + this.loadedBlocks = 0; + } + get isPageLoaded():boolean { return this.loadedBlocks >= this.allBlocks; } diff --git a/src/features/StreetcodePage/Streetcode.component.tsx b/src/features/StreetcodePage/Streetcode.component.tsx index 9b72010f9..ec867adbc 100644 --- a/src/features/StreetcodePage/Streetcode.component.tsx +++ b/src/features/StreetcodePage/Streetcode.component.tsx @@ -96,6 +96,8 @@ const StreetcodeContent = () => { toStreetcodeRedirectClickEvent(streetcodeUrl.current, fromPage); clearWindowHistoryState(); } + + return () => pageLoadercontext.resetLoadedBlocks(); }, []); return (