From 8042edaeffa3505c1b353668b49cc15aea1ecf17 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 4 Dec 2024 17:50:00 +0800 Subject: [PATCH] fix: scroll behavior --- app/(main)/ClientComponents/ServerDetailClient.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(main)/ClientComponents/ServerDetailClient.tsx b/app/(main)/ClientComponents/ServerDetailClient.tsx index a7e9315..1421c6d 100644 --- a/app/(main)/ClientComponents/ServerDetailClient.tsx +++ b/app/(main)/ClientComponents/ServerDetailClient.tsx @@ -25,7 +25,7 @@ export default function ServerDetailClient({ const [hasHistory, setHasHistory] = useState(false); useEffect(() => { - window.scrollTo(0, 0); + window.scrollTo({ top: 0, left: 0, behavior: "instant" }); }, []); useEffect(() => {