From 7726363c69e2354450253c2648f9babb1edf050b Mon Sep 17 00:00:00 2001 From: anime Date: Tue, 3 Dec 2024 19:40:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E4=BF=AE=E5=A4=8D=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E8=B0=83=E7=94=A8React=20HOOK=E7=9A=84=E9=97=AE=E9=A2=98):?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit f0f144d557535e5bd7caf975d693379cc129652b) --- components/NotionPage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/NotionPage.js b/components/NotionPage.js index 0ac8c1c0..a3f1a085 100644 --- a/components/NotionPage.js +++ b/components/NotionPage.js @@ -27,7 +27,7 @@ const NotionPage = ({ post, className }) => { }) const zoomRef = useRef(zoom ? zoom.clone() : null) - + const IMAGE_ZOOM_IN_WIDTH = siteConfig('IMAGE_ZOOM_IN_WIDTH', 1200) // 页面首次打开时执行的勾子 useEffect(() => { // 检测当前的url并自动滚动到对应目标 @@ -64,7 +64,7 @@ const NotionPage = ({ post, className }) => { // 替换为更高清的图像 mutation?.target?.setAttribute( 'src', - compressImage(src, siteConfig('IMAGE_ZOOM_IN_WIDTH', 1200)) + compressImage(src, IMAGE_ZOOM_IN_WIDTH) ) }, 800) }