Skip to content

Commit

Permalink
fix: active filter count display
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviareichl committed Sep 25, 2024
1 parent 1a98913 commit 6349f98
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions components/search-filter.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts" setup>
import { XIcon } from "lucide-vue-next";
import type { LocationQueryValue } from "vue-router";
import {
Expand All @@ -18,9 +19,9 @@ const checkedFacets = computed(() => {
const topicValue: Array<LocationQueryValue> | LocationQueryValue | undefined = route.query.topic;
return {
language: Array.isArray(languageValue) ? languageValue[0] : languageValue ?? "",
topic: Array.isArray(topicValue) ? topicValue[0] : topicValue ?? "",
} as { language: string; topic: string }; // Cast to the expected type
language: Array.isArray(languageValue) ? languageValue : languageValue ? [languageValue] : [],
topic: Array.isArray(topicValue) ? topicValue : topicValue ? [topicValue] : [],
} as { language: Array<string>; topic: Array<string> };
});
const props = defineProps<{
Expand Down Expand Up @@ -101,7 +102,9 @@ const sliderValue = ref([slider.min, slider.max]);
variant="searchform"
@click="removeFilter()"
>
<XIcon :size="12" />
<div class="bg-frisch-orange">
<XIcon :size="12" class="font-bold text-white" />
</div>
</Button>
</div>
</div>
Expand Down

0 comments on commit 6349f98

Please sign in to comment.