Skip to content

Commit

Permalink
fix: fix loadable
Browse files Browse the repository at this point in the history
  • Loading branch information
giuliaghisini committed Sep 18, 2023
1 parent ab0a639 commit 79ed94a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/ReleaseLog/ReleaseLog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand All @@ -19,7 +19,7 @@ const ReleaseLog = () => {
useEffect(() => {
fetch(ReleaseFile)
.then((res) => res.text())
.then((text) => setReleaseFileContent(Markdown(text)));
.then((text) => setReleaseFileContent(marked(text)));
}, []);

return (
Expand Down
1 change: 0 additions & 1 deletion src/config/loadables.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
6 changes: 1 addition & 5 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
];
Expand Down

0 comments on commit 79ed94a

Please sign in to comment.