Link内嵌改为a标签

This commit is contained in:
tangly1024
2021-12-15 11:37:37 +08:00
parent 400fad1a49
commit ef8f38fd7b
7 changed files with 25 additions and 24 deletions

View File

@@ -10,14 +10,14 @@ import { faAngleDoubleLeft, faAngleDoubleRight } from '@fortawesome/free-solid-s
export default function BlogAround ({ prev, next }) {
return <section className='text-gray-800 mb-8 lg:mb-32 border-t dark:text-gray-300 px-5 flex flex-wrap lg:flex-nowrap lg:space-x-10 justify-between py-2'>
<Link href={`/article/${prev.slug}`} passHref>
<div className='text-sm py-3 text-blue-500 hover:underline cursor-pointer'>
<a className='text-sm py-3 text-blue-500 hover:underline cursor-pointer'>
<FontAwesomeIcon icon={faAngleDoubleLeft} className='mr-1' />{prev.title}
</div>
</a>
</Link>
<Link href={`/article/${next.slug}`} passHref>
<div className='text-sm flex py-3 text-blue-500 hover:underline cursor-pointer'>{next.title}
<a className='text-sm flex py-3 text-blue-500 hover:underline cursor-pointer'>{next.title}
<FontAwesomeIcon icon={faAngleDoubleRight} className='ml-1 my-1' />
</div>
</a>
</Link>
</section>
}