| | import CONFIG from '../config' |
| | import { siteConfig } from '@/lib/config' |
| |
|
| | |
| | |
| | |
| | |
| | |
| | const JumpToCommentButton = () => { |
| | if (!siteConfig('HEXO_WIDGET_TO_COMMENT', null, CONFIG)) { |
| | return <></> |
| | } |
| |
|
| | function navToComment() { |
| | if (document.getElementById('comment')) { |
| | window.scrollTo({ top: document.getElementById('comment').offsetTop, behavior: 'smooth' }) |
| | } |
| | |
| | |
| | |
| | |
| | } |
| |
|
| | return (<div className='flex space-x-1 items-center justify-center transform hover:scale-105 duration-200 w-7 h-7 text-center' onClick={navToComment} > |
| | <i className='fas fa-comment text-xs' /> |
| | </div>) |
| | } |
| |
|
| | export default JumpToCommentButton |
| |
|