封装useGlobal组件,存放全局变量;
新增search页面,修复搜索页无法分页的bug
This commit is contained in:
tangly1024
2021-11-04 13:28:08 +08:00
parent 8f9d3c45e7
commit 4b53a3612c
21 changed files with 214 additions and 169 deletions

View File

@@ -1,7 +1,7 @@
import BLOG from '@/blog.config'
import { useLocale } from '@/lib/locale'
import Link from 'next/link'
import { useRouter } from 'next/router'
import { useGlobal } from '@/lib/global'
/**
* 翻页插件
@@ -11,7 +11,7 @@ import { useRouter } from 'next/router'
* @constructor
*/
const Pagination = ({ page, showNext }) => {
const locale = useLocale()
const { locale } = useGlobal()
const router = useRouter()
const currentPage = +page
return (