components/search: amend for urbit.org glossary

This commit is contained in:
Matilde Park 2022-10-19 12:28:51 -07:00
parent a79676e788
commit b7148b389b

View File

@ -92,10 +92,13 @@ class Search extends Component {
const urbitOrgSearch = fetch(this.urbitOrgSearch(encodeURIComponent(query)))
.then((res) => res.json())
.then((res) => {
return res.results.map((item) => ({
return [...res.glossary.map((item) => ({
type: "GLOSSARY_RESULT",
content: item
})), ...res.results.map((item) => ({
type: "URBIT_ORG_RESULT",
content: item,
}));
}))];
});
const opsSearch = fetch(this.opsSearch(encodeURIComponent(query)))