Skip to content

Commit

Permalink
fix(v2): fix search (#3829)
Browse files Browse the repository at this point in the history
* fix little search facet typo

* revert Alexey change, as we  are sure a site always has a locale
  • Loading branch information
slorber authored Nov 27, 2020
1 parent 0f13780 commit 22c06c2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ContextualSearchFilters = {
// We may want to support multiple search engines, don't couple that to Algolia/DocSearch
// Maybe users will want to use its own search engine solution
export default function useContextualSearchFilters(): ContextualSearchFilters {
const {siteConfig} = useDocusaurusContext();
const {i18n} = useDocusaurusContext();
const allDocsData = useAllDocsData();
const activePluginAndVersion = useActivePluginAndVersion();
const docsPreferredVersionByPluginId = useDocsPreferredVersionByPluginId();
Expand All @@ -46,7 +46,7 @@ export default function useContextualSearchFilters(): ContextualSearchFilters {
];

return {
locale: siteConfig.i18n.currentLocale,
locale: i18n.currentLocale,
tags,
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ export default function useAlgoliaContextualFacetFilters() {

const tagsFilter = tags.map((tag) => `docusaurus_tag:${tag}`);

return [...(locale ? languageFilter : []), tagsFilter];
return [languageFilter, tagsFilter];
}

0 comments on commit 22c06c2

Please sign in to comment.