修复编译异常
This commit is contained in:
tangly1024
2021-12-14 19:32:06 +08:00
parent 3796b0f64a
commit 71924deefd
7 changed files with 10 additions and 21 deletions

View File

@@ -1,5 +1,3 @@
import { useRouter } from 'next/router'
import { useEffect } from 'react'
/**
* 空白博客 列表

View File

@@ -17,13 +17,9 @@ const Pagination = ({ page, showNext }) => {
return (
<div className='my-10 flex justify-between font-medium text-black dark:text-gray-100 space-x-2'>
<Link
href={
{
pathname: (currentPage - 1 === 1 ? `${BLOG.path || '/'}` : `/page/${currentPage - 1}`),
query: router.query.s ? { s: router.query.s } : {}
}
}
>
href={ {
pathname: (currentPage - 1 === 1 ? `${BLOG.path || '/'}` : `/page/${currentPage - 1}`), query: router.query.s ? { s: router.query.s } : {}
} } passHref >
<button
rel='prev'
className={`${currentPage === 1 ? 'invisible' : 'block'} w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}
@@ -31,12 +27,7 @@ const Pagination = ({ page, showNext }) => {
{locale.PAGINATION.PREV}
</button>
</Link>
<Link href={
{
pathname: `/page/${currentPage + 1}`,
query: router.query.s ? { s: router.query.s } : {}
}
}>
<Link href={ { pathname: `/page/${currentPage + 1}`, query: router.query.s ? { s: router.query.s } : {} } } passHref>
<button
rel='next'
className={`${+showNext ? 'block' : 'invisible'} w-full duration-200 px-4 py-2 hover:border-black border-b-2 hover:font-bold`}

View File

@@ -14,7 +14,7 @@ import {
faWeibo,
faWeixin
} from '@fortawesome/free-brands-svg-icons'
import { faLink, faStar } from '@fortawesome/free-solid-svg-icons'
import { faLink } from '@fortawesome/free-solid-svg-icons'
const ShareBar = ({ post }) => {
const router = useRouter()