Skip to content

Commit

Permalink
fix: added flattenToAppUrl function to View Links with correct import
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni committed Nov 21, 2024
1 parent 0c28877 commit b4ab40e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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 (
<section
className={cx('block-calltoaction', styles.block, className)}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import config from '@plone/registry';
import type { BlockViewProps } from '@plone/types';
import { flattenToAppURL } from '@plone/volto/helpers';
import { TextBlockView } from '@plone/volto-slate/blocks/Text';
import ViewItem from '@redturtle/volto-blocks/components/blocks/IconsAndText/ViewItem';
import type { IconsAndTextData } from '@redturtle/volto-blocks/components/blocks/IconsAndText/schema';
Expand All @@ -16,10 +17,6 @@ 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 (
<>
<section
Expand Down
Original file line number Diff line number Diff line change
@@ -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/PageIntro/styles.module.css';
import type { PageIntroData } from '@redturtle/volto-blocks/components/blocks/PageIntro/schema';
Expand All @@ -15,10 +16,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 (
<section
className={cx('block-pageintro', styles.block, className)}
Expand Down
Original file line number Diff line number Diff line change
@@ -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/Testimonials/styles.module.css';
import type { TestimonialsData } from '@redturtle/volto-blocks/components/blocks/Testimonials/schema';
Expand All @@ -14,9 +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.');
}

// const Image = config.getComponent('Image').component;

Expand Down

0 comments on commit b4ab40e

Please sign in to comment.