Skip to content

Commit 672c50b

Browse files
remove cosole.log
1 parent 701f590 commit 672c50b

File tree

2 files changed

+55
-2
lines changed

2 files changed

+55
-2
lines changed

dotcom-rendering/src/components/MainMedia.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export const MainMedia = ({
110110
contentType,
111111
contentLayout,
112112
}: Props) => {
113-
console.log('MainMedia component - elements', elements);
114113
return (
115114
<div css={[mainMedia, chooseWrapper(format)]}>
116115
{elements.map((element, index) => (

dotcom-rendering/src/types/content.ts

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,23 @@ export interface InteractiveContentsBlockElement {
482482
endDocumentElementId?: string;
483483
}
484484

485+
export interface ProductBlockElement {
486+
_type: 'model.dotcomrendering.pageElements.ProductBlockElement';
487+
elementId: string;
488+
brandName: string;
489+
starRating: ProductStarRating;
490+
productName: string;
491+
image?: ProductImage;
492+
secondaryHeadingHtml: string;
493+
primaryHeadingHtml: string;
494+
customAttributes: ProductCustomAttribute[];
495+
content: FEElement[];
496+
h2Id?: string;
497+
displayType: ProductDisplayType;
498+
productCtas: ProductCta[];
499+
lowestPrice?: string;
500+
}
501+
485502
interface ProfileAtomBlockElement {
486503
_type: 'model.dotcomrendering.pageElements.ProfileAtomBlockElement';
487504
elementId: string;
@@ -847,7 +864,8 @@ export type FEElement =
847864
| VineBlockElement
848865
| YoutubeBlockElement
849866
| WitnessTypeBlockElement
850-
| CrosswordElement;
867+
| CrosswordElement
868+
| ProductBlockElement;
851869

852870
// -------------------------------------
853871
// Misc
@@ -879,11 +897,47 @@ export interface ImageSource {
879897
srcSet: SrcSetItem[];
880898
}
881899

900+
export type ProductDisplayType =
901+
| 'InlineOnly'
902+
| 'ProductCardOnly'
903+
| 'InlineWithProductCard';
904+
905+
export type ProductCta = {
906+
url: string;
907+
text: string;
908+
retailer: string;
909+
price: string;
910+
};
911+
912+
export type ProductCustomAttribute = {
913+
name: string;
914+
value: string;
915+
};
916+
917+
export type ProductStarRating =
918+
| '0'
919+
| '1'
920+
| '2'
921+
| '3'
922+
| '4'
923+
| '5'
924+
| 'none-selected';
925+
882926
export interface SrcSetItem {
883927
src: string;
884928
width: number;
885929
}
886930

931+
export interface ProductImage {
932+
url: string;
933+
caption: string;
934+
credit: string;
935+
alt: string;
936+
displayCredit: boolean;
937+
height: number;
938+
width: number;
939+
}
940+
887941
export interface Image {
888942
index: number;
889943
fields: {

0 commit comments

Comments
 (0)