封装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,13 +1,11 @@
import Link from 'next/link'
import BLOG from '@/blog.config'
import React, { useRef } from 'react'
import { useRef } from 'react'
import DarkModeButton from '@/components/DarkModeButton'
import SearchInput from '@/components/SearchInput'
import Drawer from '@/components/Drawer'
import DrawerRight from '@/components/DrawerRight'
import Logo from '@/components/Logo'
const TopNav = ({ tags, currentTag, post, posts }) => {
const TopNav = ({ tags, currentTag, post, posts, currentSearch }) => {
const drawer = useRef()
const drawerRight = useRef()
@@ -31,7 +29,7 @@ const TopNav = ({ tags, currentTag, post, posts }) => {
{/* 中间搜索框 */}
<div className='hidden sm:block w-96'>
<SearchInput currentTag={currentTag} />
<SearchInput currentTag={currentTag} currentSearch={currentSearch}/>
</div>
{/* 右侧功能 */}