fix: add support for original_url in rte
This commit is contained in:
@@ -315,12 +315,17 @@ export const renderOptions: RenderOptions = {
|
||||
return (
|
||||
<ImageContainer leftImage={leftImage} rightImage={rightImage} />
|
||||
)
|
||||
} else {
|
||||
} else if (
|
||||
entry?.node.__typename === EmbedEnum.LoyaltyPage ||
|
||||
entry?.node.__typename === EmbedEnum.ContentPage ||
|
||||
entry?.node.__typename === EmbedEnum.AccountPage
|
||||
) {
|
||||
// If entry is not an ImageContainer, it is a page and we return it as a link
|
||||
const props = extractPossibleAttributes(node.attrs)
|
||||
const href = node.attrs?.locale
|
||||
? `/${node.attrs.locale}${node.attrs.href}`
|
||||
: node.attrs.href
|
||||
const href =
|
||||
entry.node?.web?.original_url ??
|
||||
`/${entry.node.system.locale}${entry.node.url}`
|
||||
|
||||
return (
|
||||
<Link
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user