Reloading page when back button is used.
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user