mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-13 23:16:47 +00:00
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
import { useGlobal } from '@/lib/global'
|
|
import SmartLink from '@/components/SmartLink'
|
|
import { useRouter } from 'next/router'
|
|
import { useEffect, useState } from 'react'
|
|
import CONFIG from '../config'
|
|
import { siteConfig } from '@/lib/config'
|
|
import NotByAI from '@/components/NotByAI'
|
|
|
|
export default function ArticleCopyright() {
|
|
const router = useRouter()
|
|
const [path, setPath] = useState(siteConfig('LINK') + router.asPath)
|
|
useEffect(() => {
|
|
setPath(window.location.href)
|
|
})
|
|
|
|
const { locale } = useGlobal()
|
|
|
|
if (!siteConfig('COMMERCE_ARTICLE_COPYRIGHT', null, CONFIG)) {
|
|
return <></>
|
|
}
|
|
|
|
return (
|
|
<section className='dark:text-gray-300 mt-6 mx-1 '>
|
|
<ul className='overflow-x-auto whitespace-nowrap text-sm dark:bg-gray-900 bg-gray-100 p-5 leading-8 border-l-2 border-red-500'>
|
|
<li>
|
|
<strong className='mr-2'>{locale.COMMON.AUTHOR}:</strong>
|
|
<SmartLink href={'/about'} className='hover:underline'>
|
|
{siteConfig('AUTHOR')}
|
|
</SmartLink>
|
|
</li>
|
|
<li>
|
|
<strong className='mr-2'>{locale.COMMON.URL}:</strong>
|
|
<a
|
|
className='whitespace-normal break-words hover:underline'
|
|
href={path}>
|
|
{path}
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<strong className='mr-2'>{locale.COMMON.COPYRIGHT}:</strong>
|
|
{locale.COMMON.COPYRIGHT_NOTICE}
|
|
</li>
|
|
{siteConfig('COMMERCE_ARTICLE_NOT_BY_AI', false, CONFIG) && (
|
|
<li>
|
|
<NotByAI />
|
|
</li>
|
|
)}
|
|
</ul>
|
|
</section>
|
|
)
|
|
}
|