Skip to content

Commit

Permalink
Add link to rich-text
Browse files Browse the repository at this point in the history
  • Loading branch information
haninekkoub committed Oct 16, 2024
1 parent 097a22a commit fcdbc5e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion storefront/components/shared/rich-text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@ import Heading from "./typography/heading";
export const RichText = ({
value = [],
}: PortableTextProps<ArbitraryTypedObject | PortableTextBlock>) => {
const components: PortableTextComponents = {
marks: {
link: PtLink,
},
};
return (
<div className="flex flex-col gap-4">
<PortableText value={value} />
<PortableText components={components} value={value} />
</div>
);
};
Expand Down

0 comments on commit fcdbc5e

Please sign in to comment.