Skip to content

Commit

Permalink
Fixes bug with CC search page
Browse files Browse the repository at this point in the history
  • Loading branch information
ctauchen committed Jan 7, 2025
1 parent 19682df commit 9865677
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/theme/SearchBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ function ResultsFooter({ state, onClose, productId }) {
//TODO: figure this out
//current search is disabled for calico-cloud
// see docusaurus.config.js
version = '3.16'
version = '20-2'
}

const to = `/search?q=${encodeURIComponent(state.query)}&p=${productId || ''}&v=${version}`;
Expand Down
4 changes: 2 additions & 2 deletions src/theme/SearchPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function SearchPageContent() {
//current search is disabled for calico-cloud
// see docusaurus.config.js
if(productId === 'calico-cloud'){
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', `docs-calico-cloud-3.16`);
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', `docs-calico-cloud-20-2`);
}else{
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', `docs-${productId}-${version}`);
}
Expand All @@ -233,7 +233,7 @@ function SearchPageContent() {
//TODO: figure this out
//current search is disabled for calico-cloud
// see docusaurus.config.js
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', `docs-calico-cloud-3.16`);
algoliaHelper.addDisjunctiveFacetRefinement('docusaurus_tag', `docs-calico-cloud-20-2`);

}
algoliaHelper.setQuery(searchQuery).setPage(page).search();
Expand Down

0 comments on commit 9865677

Please sign in to comment.