修复Next主题bug

This commit is contained in:
tangly1024.com
2023-03-09 11:54:34 +08:00
parent b16aadf7a2
commit 26547d8e97
3 changed files with 10 additions and 10 deletions

View File

@@ -18,10 +18,6 @@ const JumpToBottomButton = ({ showPercent = false }) => {
return () => document.removeEventListener('scroll', scrollListener)
}, [show])
if (!CONFIG_NEXT.WIDGET_TO_BOTTOM) {
return <></>
}
const scrollListener = () => {
const targetRef = document.getElementById('wrapper')
const clientHeight = targetRef?.clientHeight
@@ -41,6 +37,10 @@ const JumpToBottomButton = ({ showPercent = false }) => {
window.scrollTo({ top: targetRef.clientHeight, behavior: 'smooth' })
}
if (!CONFIG_NEXT.WIDGET_TO_BOTTOM) {
return <></>
}
return (<div className='flex space-x-1 transform hover:scale-105 duration-200 py-2 px-3' onClick={scrollToBottom} >
<div className='dark:text-gray-200' >
<i className='fas fa-arrow-down' />