lib/nexmo_developer/app/webpacker/javascript/components/search/Search.vue in station-0.4.0 vs lib/nexmo_developer/app/webpacker/javascript/components/search/Search.vue in station-0.4.1

- old
+ new

@@ -45,10 +45,13 @@ <ZendeskArticle v-for="hit in result.hits" v-bind:hit="hit" v-bind:key="hitKey(result, hit)"/> </div> <div v-else-if="isNDPArticle(result)"> <NDPArticle v-for="hit in result.hits" v-bind:hit="hit" v-bind:key="hitKey(result, hit)"/> </div> + <div v-else-if="isBlog(result)"> + <Blog v-for="hit in result.hits" v-bind:hit="hit" v-bind:key="hitKey(result, hit)"/> + </div> </div> <div v-else> <p class="Nxd-search--no-results"><i>No results</i></p> </div> </div> @@ -60,10 +63,11 @@ <script> import algoliasearch from 'algoliasearch' import debounce from 'lodash/debounce' import NDPArticle from './NDPArticle.vue'; import ZendeskArticle from './ZendeskArticle.vue'; +import Blog from './Blog.vue'; export default { data: function() { return { analyticsTriggered: false, @@ -105,19 +109,24 @@ methods: { resultTitle: function(name) { if (name == 'zendesk_nexmo_articles') { return 'Knowledgebase'; } else if (name.includes('nexmo_developer')) { - return 'Nexmo Developer'; + return 'Vonage Developer'; + } else if (name == 'prod_blogposts') { + return 'Blog'; } }, isZendeskArticle: function(result) { return result.index == 'zendesk_nexmo_articles'; }, isNDPArticle: function(result) { return result.index.includes('nexmo_developer'); }, + isBlog: function(result) { + return result.index == 'prod_blogposts'; + }, hitKey: function(result, hit) { return result.index + hit.objectID; }, onClickOutside: function(event) { if (this.showResults) { @@ -202,10 +211,10 @@ this.analyticsTriggered = true; this.resetAnalyticsListeners(); } }, components: { - ZendeskArticle, NDPArticle + ZendeskArticle, NDPArticle, Blog } } </script> <style scoped> .Wrapper {