Removing result categories when no results exist in those categories.

This commit is contained in:
Roland 2023-11-21 14:46:55 -07:00
parent eefc4d4d79
commit c628af4f49
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
5 changed files with 106 additions and 29 deletions

View file

@ -1024,10 +1024,15 @@ export async function searchSuggestions(search_str) {
const response = await apiPost(`${API_URI}/search_suggestions`, body);
if (response.ok) {
const content = await response.json();
const fileGroups = content['file_groups'];
const zimsEstimates = content['zims_estimates'];
const channels = content['channels'];
const domains = content['domains'];
const tags = content['tags'];
return {
fileGroups,
zimsEstimates,
channels,
domains,
tags,