修复翻页按钮

This commit is contained in:
tangly1024
2022-01-28 09:43:40 +08:00
parent 952051a80f
commit b04ff955eb

View File

@@ -6,14 +6,15 @@ import { useGlobal } from '@/lib/global'
/** /**
* 简易翻页插件 * 简易翻页插件
* @param page 当前页码 * @param page 当前页码
* @param showNext 是否有下一页 * @param totalPage 是否有下一页
* @returns {JSX.Element} * @returns {JSX.Element}
* @constructor * @constructor
*/ */
const PaginationSimple = ({ page, showNext }) => { const PaginationSimple = ({ page, totalPage }) => {
const { locale } = useGlobal() const { locale } = useGlobal()
const router = useRouter() const router = useRouter()
const currentPage = +page const currentPage = +page
const showNext = currentPage <= totalPage
return ( return (
<div className='my-10 flex justify-between font-medium text-black dark:text-gray-100 space-x-2'> <div className='my-10 flex justify-between font-medium text-black dark:text-gray-100 space-x-2'>
<Link <Link