mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
fix: 🐛 Announcement 显隐判断条件
This commit is contained in:
@@ -25,6 +25,8 @@ const SideAreaRight = (props) => {
|
||||
const { tagOptions, currentTag, slot, categoryOptions, currentCategory, notice } = props
|
||||
const { locale } = useGlobal()
|
||||
const router = useRouter()
|
||||
const announcementVisible = notice && Object.keys(notice).length > 0
|
||||
|
||||
return (<aside id='right' className={(BLOG.LAYOUT_SIDEBAR_REVERSE ? 'mr-4' : 'ml-4') + ' space-y-4 hidden xl:block flex-col w-60 relative z-10'}>
|
||||
|
||||
{CONFIG_NEXT.RIGHT_AD && <Card className='mb-2'>
|
||||
@@ -41,7 +43,7 @@ const SideAreaRight = (props) => {
|
||||
</Card>}
|
||||
|
||||
<div className="sticky top-0 space-y-4 w-full">
|
||||
{notice && <Card>
|
||||
{announcementVisible && <Card>
|
||||
<Announcement post={notice} />
|
||||
</Card>}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user