mirror of https://github.com/explosion/spaCy.git
Fix docsearch
This commit is contained in:
parent
0155083e01
commit
c6ee030721
|
@ -7,6 +7,7 @@ import classes from '../styles/search.module.sass'
|
||||||
|
|
||||||
const Search = ({ id, placeholder, settings }) => {
|
const Search = ({ id, placeholder, settings }) => {
|
||||||
const { apiKey, indexName } = settings
|
const { apiKey, indexName } = settings
|
||||||
|
if (!apiKey && !indexName) return null
|
||||||
const [initialized, setInitialized] = useState(false)
|
const [initialized, setInitialized] = useState(false)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
|
|
Loading…
Reference in New Issue