mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
Magzine主题基本完成
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { siteConfig } from '@/lib/config'
|
||||
import dynamic from 'next/dynamic'
|
||||
|
||||
const ShareButtons = dynamic(() => import('@/components/ShareButtons'), { ssr: false })
|
||||
const ShareButtons = dynamic(() => import('@/components/ShareButtons'), {
|
||||
ssr: false
|
||||
})
|
||||
|
||||
/**
|
||||
* 分享栏
|
||||
@@ -9,14 +11,20 @@ const ShareButtons = dynamic(() => import('@/components/ShareButtons'), { ssr: f
|
||||
* @returns
|
||||
*/
|
||||
const ShareBar = ({ post }) => {
|
||||
if (!JSON.parse(siteConfig('POST_SHARE_BAR_ENABLE')) || !post || post?.type !== 'Post') {
|
||||
if (
|
||||
!JSON.parse(siteConfig('POST_SHARE_BAR_ENABLE')) ||
|
||||
!post ||
|
||||
post?.type !== 'Post'
|
||||
) {
|
||||
return <></>
|
||||
}
|
||||
|
||||
return <div className='m-1 overflow-x-auto'>
|
||||
<div className='flex w-full md:justify-end'>
|
||||
<ShareButtons post={post} />
|
||||
</div>
|
||||
return (
|
||||
<div className='m-1 overflow-x-auto'>
|
||||
<div className='flex w-full md:justify-end'>
|
||||
<ShareButtons post={post} />
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
export default ShareBar
|
||||
|
||||
Reference in New Issue
Block a user