From 10a0bda5960c688a2209699c2d394194cde53d70 Mon Sep 17 00:00:00 2001 From: Felipe Sales Date: Wed, 30 Oct 2024 15:00:46 -0300 Subject: [PATCH] Added variant to facets query --- CHANGELOG.md | 4 ++++ react/components/SearchQuery.js | 1 + react/package.json | 2 +- react/yarn.lock | 6 +++--- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c96e88ca..e1c156d87 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [Unreleased] +### Added + +- `variant` to `facets` query, used to execute A/B tests. + ## [3.133.1] - 2024-10-02 ### Fixed diff --git a/react/components/SearchQuery.js b/react/components/SearchQuery.js index c710be21f..5a8a0d291 100644 --- a/react/components/SearchQuery.js +++ b/react/components/SearchQuery.js @@ -232,6 +232,7 @@ const useQueries = (variables, facetsArgs, price) => { fuzzy: variables.fuzzy, searchState: variables.searchState || undefined, initialAttributes: getInitialAttributes(), + variant: getCookie('sp-variant'), }, skip: !facetsArgs.withFacets, }) diff --git a/react/package.json b/react/package.json index 6ed1ad7b3..03100b80f 100644 --- a/react/package.json +++ b/react/package.json @@ -63,7 +63,7 @@ "vtex.store-drawer": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-drawer@0.16.2/public/@types/vtex.store-drawer", "vtex.store-graphql": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-graphql@2.156.1/public/@types/vtex.store-graphql", "vtex.store-icons": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons", - "vtex.store-resources": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.95.0/public/@types/vtex.store-resources", + "vtex.store-resources": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.101.0/public/@types/vtex.store-resources", "vtex.structured-data": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.structured-data@0.9.1/public/@types/vtex.structured-data", "vtex.styleguide": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.styleguide@9.146.3/public/@types/vtex.styleguide", "vtex.tab-layout": "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.tab-layout@0.4.3/public/@types/vtex.tab-layout" diff --git a/react/yarn.lock b/react/yarn.lock index 8ff11e17b..5ad7f72e4 100644 --- a/react/yarn.lock +++ b/react/yarn.lock @@ -5624,9 +5624,9 @@ validate-npm-package-license@^3.0.1: version "0.18.0" resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-icons@0.18.0/public/@types/vtex.store-icons#0ee94d549aa283ce3a13ab987c13eac4fdfd1bba" -"vtex.store-resources@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.95.0/public/@types/vtex.store-resources": - version "0.95.0" - resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.95.0/public/@types/vtex.store-resources#74a95451b866ad56d7032e78298eba2174e5e2a0" +"vtex.store-resources@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.101.0/public/@types/vtex.store-resources": + version "0.101.0" + resolved "http://vtex.vtexassets.com/_v/public/typings/v1/vtex.store-resources@0.101.0/public/@types/vtex.store-resources#d692dadaabcbbd879a611dc5bec3dcd0d4f3fb31" "vtex.structured-data@http://vtex.vtexassets.com/_v/public/typings/v1/vtex.structured-data@0.9.1/public/@types/vtex.structured-data": version "0.9.1"