From 79ed94a66c0433427a3c5a07d6d509d11d66a825 Mon Sep 17 00:00:00 2001 From: Giulia Ghisini Date: Mon, 18 Sep 2023 11:33:05 +0200 Subject: [PATCH] fix: fix loadable --- src/components/ReleaseLog/ReleaseLog.jsx | 4 ++-- src/config/loadables.js | 1 - src/routes.js | 6 +----- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/components/ReleaseLog/ReleaseLog.jsx b/src/components/ReleaseLog/ReleaseLog.jsx index 590a5a72a..6f4b9fcbb 100644 --- a/src/components/ReleaseLog/ReleaseLog.jsx +++ b/src/components/ReleaseLog/ReleaseLog.jsx @@ -7,7 +7,7 @@ import React, { useState, useEffect } from 'react'; import { Container } from 'design-react-kit/dist/design-react-kit'; import { Helmet } from '@plone/volto/helpers'; -import { marked as Markdown } from 'marked'; +import { marked } from 'marked'; import './ReleaseLog.css'; @@ -19,7 +19,7 @@ const ReleaseLog = () => { useEffect(() => { fetch(ReleaseFile) .then((res) => res.text()) - .then((text) => setReleaseFileContent(Markdown(text))); + .then((text) => setReleaseFileContent(marked(text))); }, []); return ( diff --git a/src/config/loadables.js b/src/config/loadables.js index c93944f79..7ee2213d3 100644 --- a/src/config/loadables.js +++ b/src/config/loadables.js @@ -5,6 +5,5 @@ export const loadables = { reactSlick: loadable.lib(() => import('react-slick')), rrule: loadable.lib(() => import('rrule')), htmlDiffLib: loadable.lib(() => import('htmldiff-js')), - marked: loadable.lib(() => import('marked')), //read markdown files ...subsitesLoadables, }; diff --git a/src/routes.js b/src/routes.js index bc5b63323..0d714cfac 100644 --- a/src/routes.js +++ b/src/routes.js @@ -19,11 +19,7 @@ export const italiaRoutes = [ component: Search, }, { - path: '/controlpanel/release-log', - component: ReleaseLog, - }, - { - path: '/release-log', + path: ['/controlpanel/release-log', '/release-log'], component: ReleaseLog, }, ];