Skip to content

Commit 648b06c

Browse files
committed
feat: slots for user-provided content on category pages
1 parent 13d64e4 commit 648b06c

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

.changeset/thick-readers-deny.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@bigcommerce/catalyst-makeswift": patch
3+
---
4+
5+
feat: add slots for user-provided content on category pages

core/app/[locale]/(default)/(faceted)/category/[slug]/page.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { getSessionCustomerAccessToken } from '~/auth';
1313
import { facetsTransformer } from '~/data-transformers/facets-transformer';
1414
import { pageInfoTransformer } from '~/data-transformers/page-info-transformer';
1515
import { pricesTransformer } from '~/data-transformers/prices-transformer';
16+
import { Slot } from '~/lib/makeswift/slot';
1617
import { getPreferredCurrencyCode } from '~/lib/currency';
1718

1819
import { MAX_COMPARE_LIMIT } from '../../../compare/page-data';
@@ -240,6 +241,10 @@ export default async function Category(props: Props) {
240241

241242
return (
242243
<>
244+
<Slot
245+
label={`${category.name} top content`}
246+
snapshotId={`category-${categoryId}-top-content`}
247+
/>
243248
<ProductsListSection
244249
breadcrumbs={breadcrumbs}
245250
compareLabel={t('Compare.compare')}
@@ -274,6 +279,10 @@ export default async function Category(props: Props) {
274279
title={category.name}
275280
totalCount={streamableTotalCount}
276281
/>
282+
<Slot
283+
label={`${category.name} bottom content`}
284+
snapshotId={`category-${categoryId}-bottom-content`}
285+
/>
277286
<Stream value={streamableFacetedSearch}>
278287
{(search) => <CategoryViewed category={category} products={search.products.items} />}
279288
</Stream>

0 commit comments

Comments
 (0)