import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import { useRouter } from 'next/router' import { useNobeliumGlobal } from '..' /** * 搜索按钮 * @returns */ export default function SearchButton(props) { const { locale } = useGlobal() const { searchModal } = useNobeliumGlobal() const router = useRouter() function handleSearch() { if (BLOG.ALGOLIA_APP_ID) { searchModal.current.openSearch() } else { router.push('/search') } } return <>