mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-23 15:09:46 +00:00
feature:
不蒜子调整
This commit is contained in:
17
components/Busuanzi.js
Normal file
17
components/Busuanzi.js
Normal file
@@ -0,0 +1,17 @@
|
||||
import busuanzi from '@/lib/busuanzi'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
export default function Busuanzi () {
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
const busuanziRouteChange = url => {
|
||||
busuanzi.fetch()
|
||||
}
|
||||
router.events.on('routeChangeComplete', busuanziRouteChange)
|
||||
return () => {
|
||||
router.events.off('routeChangeComplete', busuanziRouteChange)
|
||||
}
|
||||
}, [router.events])
|
||||
return null
|
||||
}
|
||||
Reference in New Issue
Block a user