Refactor last release changes component to use markdown preview component

This commit is contained in:
Franco Montenegro 2021-02-02 18:34:21 -03:00 committed by Sean Yesmunt
parent d6663074e3
commit c59d827a39

View file

@ -1,7 +1,6 @@
// @flow // @flow
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import remark from 'remark'; import MarkdownPreview from 'component/common/markdown-preview';
import reactRenderer from 'remark-react';
import Button from 'component/button'; import Button from 'component/button';
import I18nMessage from 'component/i18nMessage'; import I18nMessage from 'component/i18nMessage';
@ -74,11 +73,7 @@ const LastReleaseChanges = (props: Props) => {
<div> <div>
{releaseVersionTitle} {releaseVersionTitle}
<p> <p>
{ <MarkdownPreview content={releaseChanges} />
remark()
.use(reactRenderer)
.processSync(releaseChanges).contents
}
</p> </p>
{seeReleaseNotes} {seeReleaseNotes}
</div> </div>