File tree 2 files changed +6
-6
lines changed
2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
import Image from 'next/image' ;
2
- import { CallToAction , HeroProps } from '~/shared/types' ;
2
+ import { HeroProps } from '~/shared/types' ;
3
3
import CTA from '../common/CTA' ;
4
4
5
5
const Hero = ( props : { data : HeroProps } ) => {
@@ -18,8 +18,8 @@ const Hero = (props: { data: HeroProps }) => {
18
18
< div className = "mx-auto max-w-3xl" >
19
19
{ subtitle && < p className = "mb-6 text-xl font-normal text-gray-600 dark:text-slate-400" > { subtitle } </ p > }
20
20
< div className = "flex max-w-none flex-col flex-nowrap gap-4 px-4 sm:flex-row sm:justify-center" >
21
- < CTA data = { callToAction as CallToAction } />
22
- < CTA data = { callToAction2 as CallToAction } />
21
+ { callToAction && < CTA data = { callToAction } /> }
22
+ { callToAction2 && < CTA data = { callToAction2 } /> }
23
23
</ div >
24
24
</ div >
25
25
</ div >
Original file line number Diff line number Diff line change 1
1
import Image from 'next/image' ;
2
- import { CallToAction , HeroProps } from '~/shared/types' ;
2
+ import { HeroProps } from '~/shared/types' ;
3
3
import CTA from '../common/CTA' ;
4
4
5
5
const Hero2 = ( props : { data : HeroProps } ) => {
@@ -19,8 +19,8 @@ const Hero2 = (props: { data: HeroProps }) => {
19
19
< div className = "mx-auto max-w-3xl" >
20
20
{ subtitle && < p className = "mb-8 text-xl font-normal text-gray-600 dark:text-slate-400" > { subtitle } </ p > }
21
21
< div className = "flex max-w-none flex-col flex-nowrap justify-center gap-4 sm:flex-row md:m-0 md:justify-start" >
22
- < CTA data = { callToAction as CallToAction } />
23
- < CTA data = { callToAction2 as CallToAction } />
22
+ { callToAction && < CTA data = { callToAction } /> }
23
+ { callToAction2 && < CTA data = { callToAction2 } /> }
24
24
</ div >
25
25
</ div >
26
26
</ div >
You can’t perform that action at this time.
0 commit comments