mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 15:09:22 +00:00
31 lines
580 B
JavaScript
31 lines
580 B
JavaScript
import { siteConfig } from '@/lib/config'
|
|
import dynamic from 'next/dynamic'
|
|
|
|
const ShareButtons = dynamic(() => import('@/components/ShareButtons'), {
|
|
ssr: false
|
|
})
|
|
|
|
/**
|
|
* 分享栏
|
|
* @param {} param0
|
|
* @returns
|
|
*/
|
|
const ShareBar = ({ 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>
|
|
</div>
|
|
)
|
|
}
|
|
export default ShareBar
|