File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed
core/app/[locale]/(default)/(faceted)/category/[slug] Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @bigcommerce/catalyst-makeswift " : patch
3+ ---
4+
5+ feat: add slots for user-provided content on category pages
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { facetsTransformer } from '~/data-transformers/facets-transformer';
1414import { pageInfoTransformer } from '~/data-transformers/page-info-transformer' ;
1515import { pricesTransformer } from '~/data-transformers/prices-transformer' ;
1616import { getPreferredCurrencyCode } from '~/lib/currency' ;
17+ import { Slot } from '~/lib/makeswift/slot' ;
1718
1819import { MAX_COMPARE_LIMIT } from '../../../compare/page-data' ;
1920import { getCompareProducts } from '../../fetch-compare-products' ;
@@ -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 >
You can’t perform that action at this time.
0 commit comments