mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-17 15:09:31 +00:00
fix(修复错误调用React HOOK的问题):
(cherry picked from commit f0f144d557535e5bd7caf975d693379cc129652b)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user