Reloading page when back button is used.

This commit is contained in:
2024-03-19 03:17:19 +01:00
parent e069fb71b9
commit 95e02d30af
2 changed files with 11 additions and 0 deletions

View File

@@ -13,6 +13,13 @@ async function onRenderClient(pageContext) {
const app = createApp(Page, pageProps, pageContext);
app.mount('#app');
if (typeof window !== 'undefined') {
window.addEventListener('popstate', () => {
// force reload when back button is used
window.location.reload();
});
}
}
export { onRenderClient };