Commit 60e56b5e authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge pull request #5169 from ethereum-optimism/qbzzt/230315-auto-refresh-2

feat(docs/op-stack): @tremarkley 's autorefresh
parents 5bb850b4 a4f253e0
import event from '@vuepress/plugin-pwa/lib/event'
export default ({ router }) => {
registerAutoReload();
router.addRoutes([
{ path: '/docs/', redirect: '/' },
])
}
// When new content is detected by the app, this will automatically
// refresh the page, so that users do not need to manually click
// the refresh button. For more details see:
// https://linear.app/optimism/issue/FE-1003/investigate-archive-issue-on-docs
const registerAutoReload = () => {
event.$on('sw-updated', e => e.skipWaiting().then(() => {
location.reload(true);
}))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment