mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
修复Next主题bug
This commit is contained in:
@@ -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' />
|
||||
|
||||
@@ -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 (<div className='flex space-x-1 items-center transform hover:scale-105 duration-200 py-2 px-3' onClick={() => window.scrollTo({ top: 0, behavior: 'smooth' })} >
|
||||
<div className='dark:text-gray-200' title={locale.POST.TOP} >
|
||||
<i className='fa-arrow-up fas' />
|
||||
|
||||
@@ -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 (<aside id='right' className={(BLOG.LAYOUT_SIDEBAR_REVERSE ? 'mr-4' : 'ml-4') + ' space-y-4 hidden 2xl:block flex-col w-60 relative z-10'}>
|
||||
@@ -50,7 +50,7 @@ const SideAreaRight = (props) => {
|
||||
{slot}
|
||||
|
||||
{/* 分类 */}
|
||||
{CONFIG_NEXT.RIGHT_CATEGORY_LIST && router.asPath !== '/category' && categories && (
|
||||
{CONFIG_NEXT.RIGHT_CATEGORY_LIST && router.asPath !== '/category' && categoryOptions && (
|
||||
<Card>
|
||||
<div className='text-sm px-2 flex flex-nowrap justify-between font-light'>
|
||||
<div className='pb-2 text-gray-600 dark:text-gray-300'><i className='mr-2 fas fa-th-list' />{locale.COMMON.CATEGORY}</div>
|
||||
@@ -63,11 +63,11 @@ const SideAreaRight = (props) => {
|
||||
|
||||
</Link>
|
||||
</div>
|
||||
<CategoryGroup currentCategory={currentCategory} categories={categories} />
|
||||
<CategoryGroup currentCategory={currentCategory} categories={categoryOptions} />
|
||||
</Card>
|
||||
)}
|
||||
|
||||
{CONFIG_NEXT.RIGHT_TAG_LIST && router.asPath !== '/tag' && tags && (
|
||||
{CONFIG_NEXT.RIGHT_TAG_LIST && router.asPath !== '/tag' && tagOptions && (
|
||||
<Card>
|
||||
<div className="text-sm pb-1 px-2 flex flex-nowrap justify-between font-light dark:text-gray-200">
|
||||
<div className="text-gray-600 dark:text-gray-200">
|
||||
@@ -85,7 +85,7 @@ const SideAreaRight = (props) => {
|
||||
</Link>
|
||||
</div>
|
||||
<div className="px-2 pt-2">
|
||||
<TagGroups tags={tags} currentTag={currentTag} />
|
||||
<TagGroups tags={tagOptions} currentTag={currentTag} />
|
||||
</div>
|
||||
</Card>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user