diff --git a/src/adapter/adapter.ts b/src/adapter/adapter.ts index 6dbaca3a..336c2676 100644 --- a/src/adapter/adapter.ts +++ b/src/adapter/adapter.ts @@ -1,8 +1,3 @@ -import type { - PlatformRecommendationsRequest, - PlatformResult, - PlatformSemanticQueriesRequest, -} from '@empathyco/x-adapter-platform' import type { ExperienceControlsResponse, RecommendationsRequest, @@ -12,7 +7,11 @@ import type { import { experienceControlsResponseSchema, platformAdapter, + type PlatformRecommendationsRequest, + type PlatformResult, + type PlatformSemanticQueriesRequest, recommendationsRequestSchema, + relatedPromptsEndpointAdapter, resultSchema, semanticQueriesRequestSchema, } from '@empathyco/x-adapter-platform' @@ -74,3 +73,9 @@ experienceControlsResponseSchema.$override< }, }, }) + +adapter.relatedPrompts = relatedPromptsEndpointAdapter.extends({ + endpoint: + 'https://api.empathy.co/relatedprompts/mymotivemarketplace?store=Labstore+London&lang=en', + requestMapper: ({ query }) => ({ query }), +}) diff --git a/src/components/desktop/desktop.vue b/src/components/desktop/desktop.vue index 1848edd5..cb98e091 100644 --- a/src/components/desktop/desktop.vue +++ b/src/components/desktop/desktop.vue @@ -9,7 +9,11 @@ - + @@ -52,9 +56,9 @@ diff --git a/src/components/main.vue b/src/components/main.vue index 870ba3bc..adbbb6d7 100644 --- a/src/components/main.vue +++ b/src/components/main.vue @@ -4,10 +4,16 @@ - + + + + - + @@ -18,34 +24,64 @@ diff --git a/src/components/related-prompts/custom-related-prompts.vue b/src/components/related-prompts/custom-related-prompts.vue new file mode 100644 index 00000000..1088b18c --- /dev/null +++ b/src/components/related-prompts/custom-related-prompts.vue @@ -0,0 +1,72 @@ + + + + + {{ x.query.search }} + + + + + + + + + + diff --git a/src/components/related-prompts/related-prompts-tag-list.vue b/src/components/related-prompts/related-prompts-tag-list.vue new file mode 100644 index 00000000..b4e1abac --- /dev/null +++ b/src/components/related-prompts/related-prompts-tag-list.vue @@ -0,0 +1,224 @@ + + + + + + + + + {{ suggestion.suggestionText }} + + + + + + + + + + + + + {{ query }} + + + + + + + + + + + + diff --git a/src/components/search/results/custom-query-preview.vue b/src/components/search/results/custom-query-preview.vue new file mode 100644 index 00000000..d72284d1 --- /dev/null +++ b/src/components/search/results/custom-query-preview.vue @@ -0,0 +1,73 @@ + + + + + {{ queryPreviewInfo.title }} + + + + + {{ queryPreviewInfo.query }} + ({{ totalResults }}) + + + + + + + + + + + + + + diff --git a/src/components/search/results/results.vue b/src/components/search/results/results.vue index 2df5859d..af17ac3a 100644 --- a/src/components/search/results/results.vue +++ b/src/components/search/results/results.vue @@ -6,11 +6,10 @@ > - - - + + + - +