Skip to content

Commit

Permalink
fix: displaying override if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
rezakalfane committed May 2, 2024
1 parent e58a70b commit cd340b6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/cms-modern/ProductContent/ProductContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { getImageURL } from '@utils/getImageURL';

type TextProps = {} & CmsContent;

const Text = ({ header, text = [], align = 'left' }: TextProps) => {
const Text = ({ header, text = [], textOverride = [], align = 'left' }: TextProps) => {
const options = {
overrides: {
h1: { component: Typography, props: { variant: 'h1' } },
Expand All @@ -28,6 +28,8 @@ const Text = ({ header, text = [], align = 'left' }: TextProps) => {
},
};

if (textOverride) text = textOverride;

return (
<>
{header && (
Expand Down

0 comments on commit cd340b6

Please sign in to comment.