移除Preact框架、引入react-hook检查

This commit is contained in:
tangly1024
2022-11-30 22:08:15 +08:00
parent c527673b84
commit 2f76a7314c
12 changed files with 54 additions and 171 deletions

View File

@@ -3,7 +3,6 @@ import { useImperativeHandle, useRef, useState } from 'react'
let lock = false
const SearchInput = ({ currentTag, currentSearch, cRef, className }) => {
// const [searchKey, setSearchKey] = useState(currentSearch || getSearchKey() || '')
const [onLoading, setLoadingState] = useState(false)
const router = useRouter()
const searchInputRef = useRef()
@@ -20,9 +19,6 @@ const SearchInput = ({ currentTag, currentSearch, cRef, className }) => {
if (key && key !== '') {
setLoadingState(true)
// router.push({ pathname: '/search/' + key }).then(r => {
// setLoadingState(false)
// })
location.href = '/search/' + key
} else {
router.push({ pathname: '/' }).then(r => {