Skip to content

Commit

Permalink
chore(storefront): Update product-details section props types with …
Browse files Browse the repository at this point in the history
…optional `hasSpecifications`
  • Loading branch information
leomp12 committed Oct 16, 2023
1 parent aa002a4 commit 755a424
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/storefront/src/lib/layouts/use-page-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const usePageHero = async ({ routeContext }: Props) => {
};

type CustomSection = { type: `${string}:${string}`, props: any };
type ProductDetailsProps = { hasDescription?: boolean, hasSpecifications?: boolean };

export const usePageSections = async <T extends CustomSection = CustomSection>
({ routeContext, handleCustomSection }: Props) => {
Expand All @@ -50,7 +51,7 @@ export const usePageSections = async <T extends CustomSection = CustomSection>
T
| { type: 'product-shelf', props: UseProductShelfProps }
| { type: 'banners-grid', props: { banners: UseBannerProps[] } }
| { type: 'product-details', props: { hasDescription?: boolean } }
| { type: 'product-details', props: ProductDetailsProps }
| { type: 'breadcrumbs', props: {} }
| { type: 'related-products', props: {} }
| { type: 'doc-description', props: {} }
Expand Down

0 comments on commit 755a424

Please sign in to comment.