From 2ca3973052369b9f9527db2ef740b103f7d8c6cf Mon Sep 17 00:00:00 2001 From: Alin Voinea Date: Mon, 17 Aug 2020 16:43:03 +0300 Subject: [PATCH] Cosmetics --- src/components/theme/Widgets/RelationWidget.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/theme/Widgets/RelationWidget.jsx b/src/components/theme/Widgets/RelationWidget.jsx index ee44cee..3552eae 100644 --- a/src/components/theme/Widgets/RelationWidget.jsx +++ b/src/components/theme/Widgets/RelationWidget.jsx @@ -1,13 +1,13 @@ import React from 'react'; import cx from 'classnames'; -import { settings } from '~/config'; +import { flattenToAppURL } from '@plone/volto/helpers'; export const RelationWidget = ({ value, children, className }) => { if (!value) { return ''; } - const url = (value['@id'] || '#').replace(settings.apiPath, ''); + const url = flattenToAppURL(value['@id'] || '#'); const state = value.review_state || ''; const description = value.description || ''; const type = value['@type'] || '';