diff options
Diffstat (limited to 'src/components/SearchModal.vue')
| -rw-r--r-- | src/components/SearchModal.vue | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/components/SearchModal.vue b/src/components/SearchModal.vue index 9ea10c8..4ea5cea 100644 --- a/src/components/SearchModal.vue +++ b/src/components/SearchModal.vue @@ -3,10 +3,7 @@ import {defineComponent, PropType} from 'vue'; import SearchIcon from './icon/SearchIcon.vue'; import InfoIcon from './icon/InfoIcon.vue'; import {LayoutNode} from '../layout'; -import type {TolMap} from '../tol'; - -type SearchSugg = {name: string, canonicalName: string | null}; // Represents a search string suggestion -type SearchSuggResponse = [SearchSugg[], boolean]; // Holds search suggestions and an indication of if there was more +import type {TolMap, SearchSugg, SearchSuggResponse} from '../lib'; // Displays a search box, and sends search requests export default defineComponent({ @@ -107,8 +104,8 @@ export default defineComponent({ return response.json() }) .then((results: SearchSuggResponse) => { - this.searchSuggs = results[0]; - this.searchHasMoreSuggs = results[1]; + this.searchSuggs = results.suggs; + this.searchHasMoreSuggs = results.hasMore; this.focusedSuggIdx = null; }) .catch(error => { |
