Files
Hermes/src/modules/nprogress.ts
2021-09-23 21:28:45 +02:00

10 lines
259 B
TypeScript

import NProgress from 'nprogress'
import { UserModule } from '~/types'
export const install: UserModule = ({ isClient, router }) => {
if (isClient) {
router.beforeEach(() => { NProgress.start() })
router.afterEach(() => { NProgress.done() })
}
}