We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ef91778 + 24d9d1c commit 091a7e5Copy full SHA for 091a7e5
components/CursorDot.js
@@ -1,6 +1,9 @@
1
+import { RouteMatcher } from 'next/dist/server/future/route-matchers/route-matcher';
2
+import { useRouter } from 'next/router';
3
import { useEffect } from 'react';
4
5
const CursorDot = () => {
6
+ const router = useRouter();
7
useEffect(() => {
8
// 创建小白点元素
9
const dot = document.createElement('div');
@@ -61,7 +64,7 @@ const CursorDot = () => {
61
64
});
62
65
document.body.removeChild(dot);
63
66
};
- }, []);
67
+ }, [router]);
68
69
return (
70
<style jsx global>{`
0 commit comments