Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/thick-readers-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-makeswift": patch
---

feat: add slots for user-provided content on category pages
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { facetsTransformer } from '~/data-transformers/facets-transformer';
import { pageInfoTransformer } from '~/data-transformers/page-info-transformer';
import { pricesTransformer } from '~/data-transformers/prices-transformer';
import { getPreferredCurrencyCode } from '~/lib/currency';
import { Slot } from '~/lib/makeswift/slot';

import { MAX_COMPARE_LIMIT } from '../../../compare/page-data';
import { getCompareProducts } from '../../fetch-compare-products';
Expand Down Expand Up @@ -240,6 +241,10 @@ export default async function Category(props: Props) {

return (
<>
<Slot
label={`${category.name} top content`}
snapshotId={`category-${categoryId}-top-content`}
/>
<ProductsListSection
breadcrumbs={breadcrumbs}
compareLabel={t('Compare.compare')}
Expand Down Expand Up @@ -274,6 +279,10 @@ export default async function Category(props: Props) {
title={category.name}
totalCount={streamableTotalCount}
/>
<Slot
label={`${category.name} bottom content`}
snapshotId={`category-${categoryId}-bottom-content`}
/>
<Stream value={streamableFacetedSearch}>
{(search) => <CategoryViewed category={category} products={search.products.items} />}
</Stream>
Expand Down