mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-07 07:26:46 +00:00
部分组件bug修复
This commit is contained in:
@@ -17,10 +17,6 @@ export const MenuItemCollapse = props => {
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
if (!link || !link.show) {
|
||||
return null
|
||||
}
|
||||
|
||||
const selected = router.pathname === link.href || router.asPath === link.href
|
||||
|
||||
const toggleShow = () => {
|
||||
@@ -36,6 +32,10 @@ export const MenuItemCollapse = props => {
|
||||
setOpen(false)
|
||||
}, [router])
|
||||
|
||||
if (!link || !link.show) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
|
||||
@@ -14,10 +14,11 @@ import Swiper from './Swiper'
|
||||
const PostListRecommend = ({ latestPosts, allNavPages }) => {
|
||||
// 获取推荐文章
|
||||
const recommendPosts = getTopPosts({ latestPosts, allNavPages })
|
||||
const title = siteConfig('MAGZINE_RECOMMEND_POST_TITLE', '', CONFIG)
|
||||
|
||||
if (!recommendPosts || recommendPosts.length === 0) {
|
||||
return <PostListEmpty />
|
||||
}
|
||||
const title = siteConfig('MAGZINE_RECOMMEND_POST_TITLE', '', CONFIG)
|
||||
|
||||
return (
|
||||
<div className={`w-full py-10 px-2 bg-[#F6F6F1] dark:bg-black`}>
|
||||
|
||||
Reference in New Issue
Block a user