mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-05 07:26:46 +00:00
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useRouter } from 'next/router'
|
||||
|
||||
/**
|
||||
@@ -22,7 +22,7 @@ const PaginationNumber = ({ page, totalPage }) => {
|
||||
return (
|
||||
<div className='mt-10 mb-5 flex justify-center items-end font-medium text-indigo-400 duration-500 py-3 space-x-2'>
|
||||
{/* 上一页 */}
|
||||
<Link
|
||||
<SmartLink
|
||||
href={{
|
||||
pathname:
|
||||
currentPage === 2
|
||||
@@ -33,12 +33,12 @@ const PaginationNumber = ({ page, totalPage }) => {
|
||||
rel='prev'
|
||||
className={`${currentPage === 1 ? 'invisible' : 'block'} pb-0.5 hover:bg-indigo-400 hover:text-white w-6 text-center cursor-pointer duration-200 hover:font-bold`}>
|
||||
<i className='fas fa-angle-left' />
|
||||
</Link>
|
||||
</SmartLink>
|
||||
|
||||
{pages}
|
||||
|
||||
{/* 下一页 */}
|
||||
<Link
|
||||
<SmartLink
|
||||
href={{
|
||||
pathname: `${pagePrefix}/page/${currentPage + 1}`,
|
||||
query: router.query.s ? { s: router.query.s } : {}
|
||||
@@ -46,7 +46,7 @@ const PaginationNumber = ({ page, totalPage }) => {
|
||||
rel='next'
|
||||
className={`${+showNext ? 'block' : 'invisible'} pb-0.5 hover:bg-indigo-400 hover:text-white w-6 text-center cursor-pointer duration-200 hover:font-bold`}>
|
||||
<i className='fas fa-angle-right' />
|
||||
</Link>
|
||||
</SmartLink>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -61,7 +61,7 @@ const PaginationNumber = ({ page, totalPage }) => {
|
||||
function getPageElement(page, currentPage, pagePrefix) {
|
||||
const selected = page + '' === currentPage + ''
|
||||
return (
|
||||
<Link
|
||||
<SmartLink
|
||||
href={page === 1 ? `${pagePrefix}/` : `${pagePrefix}/page/${page}`}
|
||||
key={page}
|
||||
passHref
|
||||
@@ -74,7 +74,7 @@ function getPageElement(page, currentPage, pagePrefix) {
|
||||
cursor-pointer pb-0.5 w-6 text-center
|
||||
`}>
|
||||
{page}
|
||||
</Link>
|
||||
</SmartLink>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user