From 5d92a4d951f57bf53360f65500eaff2e7f14d916 Mon Sep 17 00:00:00 2001 From: Sam Carlton Date: Tue, 7 Jun 2022 14:59:08 -0500 Subject: [PATCH] Fix app kind not rendering --- src/pages/kind/[...kindPath].astro | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/pages/kind/[...kindPath].astro b/src/pages/kind/[...kindPath].astro index 196a542..80e085e 100644 --- a/src/pages/kind/[...kindPath].astro +++ b/src/pages/kind/[...kindPath].astro @@ -44,15 +44,24 @@ const kindPage = { }) ) } +let pageLabel = 'Mac Apps' +const baseFilters = [] + const categorySlug = getKindToCategorySlug( pathSlug ) -const category = categories[ categorySlug ] +// If we have a category slug, add a filter +if ( !!categorySlug ) { + const category = categories[ categorySlug ] -const baseFilters = [ - makeCategoryFilterFromCategorySlug( categorySlug ), -] + console.log( 'pathSlug', pathSlug ) + console.log( 'category', category ) -const pageLabel = category?.pluralLabel || category.label + const baseFilters = [ + makeCategoryFilterFromCategorySlug( categorySlug ), + ] + + pageLabel = category?.pluralLabel || category.label +} ---