From 76d3a939d2b6751148ad7be2191815cf64624931 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A6=BA=E7=8B=A8?= <18119604035@163.com> Date: Mon, 17 Apr 2023 14:28:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=BB=9A=E5=88=B0=E5=88=B0?= =?UTF-8?q?=E9=A1=B6=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AutoTop.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/AutoTop.ts b/src/AutoTop.ts index f3a29ea..fc8efa6 100644 --- a/src/AutoTop.ts +++ b/src/AutoTop.ts @@ -1,7 +1,8 @@ +import React from "react"; import { useLayoutEffect } from "react"; import { useLocation } from "react-router-dom"; -const AutoScorllTop = ({ children }) => { +const AutoScorllTop: React.FC<{ children: any }> = ({ children }) => { const location = useLocation(); useLayoutEffect(() => { document.documentElement.scrollTo(0, 0);