From b4ab40ecbf8816b3101be3b19b43cfdc01db9344 Mon Sep 17 00:00:00 2001 From: "sabrina.bongiovanni" Date: Thu, 21 Nov 2024 09:59:37 +0100 Subject: [PATCH] fix: added flattenToAppUrl function to View Links with correct import --- .../src/components/blocks/CallToAction/View.tsx | 6 +----- .../src/components/blocks/IconsAndText/View.tsx | 5 +---- .../volto-blocks/src/components/blocks/PageIntro/View.tsx | 5 +---- .../src/components/blocks/Testimonials/View.tsx | 4 +--- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/volto-blocks/src/components/blocks/CallToAction/View.tsx b/packages/volto-blocks/src/components/blocks/CallToAction/View.tsx index f8c27b2..f53843f 100644 --- a/packages/volto-blocks/src/components/blocks/CallToAction/View.tsx +++ b/packages/volto-blocks/src/components/blocks/CallToAction/View.tsx @@ -1,6 +1,7 @@ import cx from 'classnames'; import { TextBlockView } from '@plone/volto-slate/blocks/Text'; import type { BlockViewProps } from '@plone/types'; +import { flattenToAppURL } from '@plone/volto/helpers'; import styles from '@redturtle/volto-blocks/components/blocks/CallToAction/styles.module.css'; import type { CallToActionData } from '@redturtle/volto-blocks/components/blocks/CallToAction/schema'; @@ -14,11 +15,6 @@ type Props = BlockViewProps & { export default function View({ data, className, style }: Props) { const Container = config.getComponent('Container').component || 'div'; - - function flattenToAppURL(arg0: any) { - throw new Error('Function not implemented.'); - } - return (