Skip to content

Commit

Permalink
added remove filters translation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielecalda committed Aug 31, 2023
1 parent 92fab3c commit 96e3b40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js-packages/search-frontend/src/components/ActiveFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { css } from "styled-components/macro";
import { OverlayScrollbarsComponent } from "overlayscrollbars-react";
import { ConfigurationUpdateFunction } from "../embeddable/entry";
import { capitalize } from "lodash";
import { useTranslation } from "react-i18next";

const OverlayScrollbarsComponentDockerFix = OverlayScrollbarsComponent as any; // for some reason this component breaks build inside docker
export function ActiveFilter({
searchQuery,
Expand All @@ -16,6 +18,7 @@ export function ActiveFilter({
onRemoveFilterToken: (searchToken: SearchToken) => void;
onConfigurationChange: ConfigurationUpdateFunction;
}) {
const { t } = useTranslation();
if (searchQuery.length === 0) return null;
const activeFilters = searchQuery.filter(
(search) => "goToSuggestion" in search,
Expand Down Expand Up @@ -110,7 +113,7 @@ export function ActiveFilter({
`}
onClick={() => onConfigurationChange({ filterTokens: [] })}
>
Remove Filters
{t("remove-filters")}
</button>
)}
</div>
Expand Down

0 comments on commit 96e3b40

Please sign in to comment.