File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
samples/nextjs-template/src/components Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 11import { contentType , Infer } from '@optimizely/cms-sdk' ;
22import { RichText , ElementProps } from '@optimizely/cms-sdk/react/richText' ;
3+ import { getPreviewUtils } from '@optimizely/cms-sdk/react/server' ;
34import Image from 'next/image' ;
45
56export const AboutUsContentType = contentType ( {
@@ -32,11 +33,12 @@ const customHeadingTwo = (props: ElementProps) => {
3233} ;
3334
3435export default function AboutUs ( { opti } : AboutUsProps ) {
36+ const { src } = getPreviewUtils ( opti ) ;
3537 return (
3638 < section className = "about-us" >
3739 { opti ?. image ?. url ?. default && (
3840 < div className = "about-us-image" >
39- < Image src = { opti . image . url . default } alt = "aboutus_image" />
41+ < Image src = { src ( opti . image . url . default ) } alt = "" fill = { true } />
4042 </ div >
4143 ) }
4244 < h2 > { opti . heading } </ h2 >
You can’t perform that action at this time.
0 commit comments