封装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,8 +1,7 @@
import BLOG from '@/blog.config'
import dynamic from 'next/dynamic'
import { useRouter } from 'next/router'
import { useTheme } from '@/lib/theme'
import { useEffect, useState } from 'react'
import { useGlobal } from '@/lib/global'
const GitalkComponent = dynamic(
() => {
@@ -25,7 +24,7 @@ const CusdisComponent = dynamic(
const Comment = ({ frontMatter }) => {
const router = useRouter()
const { theme } = useTheme()
const { theme } = useGlobal()
return <div className='comment text-gray-800 dark:text-gray-300'>
<div className='font-bold pt-2 pb-4 '>留下评论</div>