diff --git a/themes/next/components/JumpToBottomButton.js b/themes/next/components/JumpToBottomButton.js index 8da40c86..c54b7b59 100644 --- a/themes/next/components/JumpToBottomButton.js +++ b/themes/next/components/JumpToBottomButton.js @@ -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 (
diff --git a/themes/next/components/JumpToTopButton.js b/themes/next/components/JumpToTopButton.js index ce7685a1..9ff51635 100644 --- a/themes/next/components/JumpToTopButton.js +++ b/themes/next/components/JumpToTopButton.js @@ -11,10 +11,10 @@ import CONFIG_NEXT from '../config_next' * @constructor */ const JumpToTopButton = ({ showPercent = true, percent }) => { + const { locale } = useGlobal() if (!CONFIG_NEXT.WIDGET_TO_TOP) { return <> } - const { locale } = useGlobal() return (
window.scrollTo({ top: 0, behavior: 'smooth' })} >
diff --git a/themes/next/components/SideAreaRight.js b/themes/next/components/SideAreaRight.js index 26372663..915316b2 100644 --- a/themes/next/components/SideAreaRight.js +++ b/themes/next/components/SideAreaRight.js @@ -22,7 +22,7 @@ const NextRecentComments = dynamic(() => import('./NextRecentComments')) * @constructor */ const SideAreaRight = (props) => { - const { tags, currentTag, slot, categories, currentCategory, notice } = props + const { tagOptions, currentTag, slot, categoryOptions, currentCategory, notice } = props const { locale } = useGlobal() const router = useRouter() return (