@@ -8,6 +8,7 @@ import useOptimizelyVariation, {
88 ExperimentType ,
99} from '#app/hooks/useOptimizelyVariation' ;
1010import useHydrationDetection from '#app/hooks/useHydrationDetection' ;
11+ import useClickTrackerHandler from '#app/hooks/useClickTrackerHandler' ;
1112import styles from './index.styles' ;
1213import PortraitVideoModal from '../PortraitVideoModal' ;
1314import { BumpLoader } from '../MediaLoader' ;
@@ -16,13 +17,15 @@ import PortraitCarouselNavigation from './PortraitVideoCarouselNavigation';
1617import Heading from '../Heading' ;
1718import PortraitVideoNoJs from './PortraitVideoNoJs' ;
1819import { PortraitClipMediaBlock } from '../MediaLoader/types' ;
20+ import Subheading from '../Curation/Subhead' ;
1921
2022type PortraitVideoCarouselProps = {
2123 title ?: string ;
2224 blocks : PortraitClipMediaBlock [ ] ;
2325 eventTrackingData : EventTrackingData ;
2426 className ?: string ;
2527 backgroundColor ?: string ;
28+ link ?: string ;
2629} ;
2730
2831const PortraitVideoCarousel = ( {
@@ -31,6 +34,7 @@ const PortraitVideoCarousel = ({
3134 eventTrackingData,
3235 className,
3336 backgroundColor,
37+ link,
3438} : PortraitVideoCarouselProps ) => {
3539 const scrollRef = useRef < HTMLUListElement > ( null ) ;
3640 const [ isModalOpen , setIsModalOpen ] = useState ( false ) ;
@@ -66,6 +70,8 @@ const PortraitVideoCarousel = ({
6670
6771 const viewTracker = useViewTracker ( eventTrackingDataExtended ) ;
6872
73+ const subheadingClickTracker = useClickTrackerHandler ( eventTrackingData ) ;
74+
6975 if ( isLite || isAmp ) return null ;
7076
7177 const handlePromoClick = ( index : number ) => {
@@ -91,15 +97,21 @@ const PortraitVideoCarousel = ({
9197 className = { className }
9298 { ...viewTracker }
9399 >
94- { title && (
95- < Heading
96- level = { 2 }
97- size = "doublePica"
98- fontVariant = "sansBold"
99- css = { styles . heading }
100- >
100+ { link && title ? (
101+ < Subheading link = { link } { ...subheadingClickTracker } >
101102 { title }
102- </ Heading >
103+ </ Subheading >
104+ ) : (
105+ title && (
106+ < Heading
107+ level = { 2 }
108+ size = "doublePica"
109+ fontVariant = "sansBold"
110+ css = { styles . heading }
111+ >
112+ { title }
113+ </ Heading >
114+ )
103115 ) }
104116 < noscript >
105117 < PortraitVideoNoJs />
0 commit comments