From 7c066e562cb634722037aa70cebdfcdba60e4a55 Mon Sep 17 00:00:00 2001 From: David Featherston Date: Wed, 29 May 2024 13:12:53 +1000 Subject: [PATCH 1/3] fix(@dpc-sdp/ripple-tide-search): remove external link check so results always link to result page --- packages/ripple-tide-search/composables/useSearchResult.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packages/ripple-tide-search/composables/useSearchResult.ts b/packages/ripple-tide-search/composables/useSearchResult.ts index 01913d1fd1..9ae64f2418 100644 --- a/packages/ripple-tide-search/composables/useSearchResult.ts +++ b/packages/ripple-tide-search/composables/useSearchResult.ts @@ -9,12 +9,6 @@ export default (result, options: ResultOptions = { summaryMaxLength: 150 }) => { const { $app_origin } = useNuxtApp() const title = computed(() => getSearchResultValue(result, 'title')) const url = computed(() => { - const externalURL = getSearchResultValue(result, 'field_node_link') - - if (externalURL) { - return externalURL - } - return stripSiteId(getSearchResultValue(result, 'url'), $app_origin || '') }) const updated = computed(() => { From 860d28244e396f081255f27c877f7b01347f244b Mon Sep 17 00:00:00 2001 From: David Featherston Date: Thu, 30 May 2024 11:32:04 +1000 Subject: [PATCH 2/3] fix(@dpc-sdp/ripple-tide-grant): check for external links --- .../components/global/TideGrantSearchResult.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue b/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue index 8e1ffac011..8bedda143d 100644 --- a/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue +++ b/packages/ripple-tide-grant/components/global/TideGrantSearchResult.vue @@ -40,13 +40,19 @@ const dateFrom = computed(() => const dateTo = computed(() => getSearchResultValue(props.result, 'field_node_dates_end_value') ) + +const link = computed(() => { + const externalURL = getSearchResultValue(props.result, 'field_node_link') + + return externalURL || url.value +})