From 24d9d1cfad4c8acbfda898bd6ecca9fec1c442fa Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sun, 13 Apr 2025 14:43:27 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83=E7=99=BD=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/CursorDot.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/CursorDot.js b/components/CursorDot.js index cba42327..1e00001e 100644 --- a/components/CursorDot.js +++ b/components/CursorDot.js @@ -1,6 +1,9 @@ +import { RouteMatcher } from 'next/dist/server/future/route-matchers/route-matcher'; +import { useRouter } from 'next/router'; import { useEffect } from 'react'; const CursorDot = () => { + const router = useRouter(); useEffect(() => { // 创建小白点元素 const dot = document.createElement('div'); @@ -61,7 +64,7 @@ const CursorDot = () => { }); document.body.removeChild(dot); }; - }, []); + }, [router]); return (