diff --git a/packages/sitecore-jss-nextjs/src/components/NextImage.tsx b/packages/sitecore-jss-nextjs/src/components/NextImage.tsx index 2d1e8d8ad9..dded07e4a2 100644 --- a/packages/sitecore-jss-nextjs/src/components/NextImage.tsx +++ b/packages/sitecore-jss-nextjs/src/components/NextImage.tsx @@ -20,7 +20,7 @@ export const NextImage: React.FC = ({ fill, priority, ...otherProps -}) => { +} = {editable: true}) => { // next handles src and we use a custom loader, // throw error if these are present if (otherProps.src) { @@ -105,8 +105,4 @@ NextImage.propTypes = { ), }; -NextImage.defaultProps = { - editable: true, -}; - NextImage.displayName = 'NextImage'; diff --git a/packages/sitecore-jss-nextjs/src/components/RichText.tsx b/packages/sitecore-jss-nextjs/src/components/RichText.tsx index a89a2b081a..3197530972 100644 --- a/packages/sitecore-jss-nextjs/src/components/RichText.tsx +++ b/packages/sitecore-jss-nextjs/src/components/RichText.tsx @@ -24,7 +24,7 @@ export type RichTextProps = ReactRichTextProps & { const prefetched: { [cacheKey: string]: boolean } = {}; -export const RichText = (props: RichTextProps): JSX.Element => { +export const RichText = (props: RichTextProps = {tag: 'div', editable: true}): JSX.Element => { const { internalLinksSelector = 'a[href^="/"]', prefetchLinks = true, ...rest } = props; const hasText = props.field && props.field.value; const isEditing = props.editable && props.field && props.field.editable; @@ -77,9 +77,4 @@ RichText.propTypes = { ...RichTextPropTypes, }; -RichText.defaultProps = { - tag: 'div', - editable: true, -}; - RichText.displayName = 'NextRichText';