From 6c2edce5afd2b60a7a739a5a2e55c03a325773c4 Mon Sep 17 00:00:00 2001 From: hamster1963 <1410514192@qq.com> Date: Wed, 30 Oct 2024 17:34:02 +0800 Subject: [PATCH] fix: unexpected scrollIntoView --- .eslintrc.json | 3 ++- components/Switch.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 40a4775..2884730 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -2,6 +2,7 @@ "extends": ["next/core-web-vitals", "next/typescript"], "rules": { "@typescript-eslint/no-explicit-any": "off", - "@next/next/no-img-element": "off" + "@next/next/no-img-element": "off", + "react-hooks/exhaustive-deps": "off" } } diff --git a/components/Switch.tsx b/components/Switch.tsx index 0d6fbe1..4b0b0c4 100644 --- a/components/Switch.tsx +++ b/components/Switch.tsx @@ -53,7 +53,7 @@ export default function Switch({ inline: "center", }); } - }, [nowTag, allTag]); + }, [nowTag]); return (