Set base filters for kind template

This commit is contained in:
Sam Carlton 2022-06-05 11:49:28 -05:00
parent a893f7d1ef
commit b50be1b27a

View file

@ -6,7 +6,11 @@
import { DoesItAPI } from '~/helpers/api/client.js'
import { getPathPartsFromAstroRequest } from '~/helpers/url.js'
import { catchRedirectResponse } from '~/helpers/astro/request.js'
import { categories, getKindToCategorySlug } from '~/helpers/categories.js'
import {
categories,
getKindToCategorySlug,
makeCategoryFilterFromCategorySlug
} from '~/helpers/categories.js'
import Layout from '../../layouts/default.astro'
import Search from '~/components/search-stork.vue'
@ -35,6 +39,10 @@ const categorySlug = getKindToCategorySlug( pathSlug )
const category = categories[ categorySlug ]
const baseFilters = [
makeCategoryFilterFromCategorySlug( categorySlug ),
]
const pageLabel = category?.pluralLabel || category.label
---
@ -69,6 +77,7 @@ const pageLabel = category?.pluralLabel || category.label
<Search
kind-page={ kindPage }
base-filters={ baseFilters }
client:load
/>