适配NextJs13语法

This commit is contained in:
tangly1024
2023-01-01 19:42:37 +08:00
parent b361f7fa0c
commit 6bb5571655
110 changed files with 2494 additions and 2057 deletions

View File

@@ -9,16 +9,24 @@ export default function BlogAround ({ prev, next }) {
if (!prev || !next) {
return <></>
}
return <section className='text-gray-800 border-t dark:text-gray-300 flex flex-wrap lg:flex-nowrap lg:space-x-10 justify-between py-2'>
{prev && <Link href={`/${prev.slug}`} passHref>
<a className='text-sm py-3 text-gray-400 hover:underline cursor-pointer'>
return (
<section className='text-gray-800 border-t dark:text-gray-300 flex flex-wrap lg:flex-nowrap lg:space-x-10 justify-between py-2'>
{prev && <Link
href={`/${prev.slug}`}
passHref
className='text-sm py-3 text-gray-400 hover:underline cursor-pointer'>
<i className='mr-1 fas fa-angle-double-left' />{prev.title}
</a>
</Link>}
{next && <Link href={`/${next.slug}`} passHref>
<a className='text-sm flex py-3 text-gray-400 hover:underline cursor-pointer'>{next.title}
</Link>}
{next && <Link
href={`/${next.slug}`}
passHref
className='text-sm flex py-3 text-gray-400 hover:underline cursor-pointer'>
{next.title}
<i className='ml-1 my-1 fas fa-angle-double-right' />
</a>
</Link>}
</section>
</Link>}
</section>
);
}