|
|
@ -25,11 +25,14 @@ function debounce(func, timeout = 300) {
|
|
|
|
|
|
|
|
|
|
|
|
registerHandlers(debounce((e) => {
|
|
|
|
registerHandlers(debounce((e) => {
|
|
|
|
term = e.target.value
|
|
|
|
term = e.target.value
|
|
|
|
|
|
|
|
if (term !== "") {
|
|
|
|
searchContents(term)
|
|
|
|
searchContents(term)
|
|
|
|
.then((res) => res.results.map(entry => ({
|
|
|
|
.then((res) => res.results.map(entry => ({
|
|
|
|
url: entry.object.metadata.url,
|
|
|
|
url: entry.object.properties.url,
|
|
|
|
content: entry.snippet,
|
|
|
|
content: entry.snippet,
|
|
|
|
title: entry.object.title
|
|
|
|
title: entry.object.metadata.title
|
|
|
|
})))
|
|
|
|
})
|
|
|
|
|
|
|
|
))
|
|
|
|
.then(results => displayResults(results))
|
|
|
|
.then(results => displayResults(results))
|
|
|
|
|
|
|
|
}
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|