Refactor last release changes component to use markdown preview component
This commit is contained in:
parent
d6663074e3
commit
c59d827a39
1 changed files with 2 additions and 7 deletions
|
@ -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>
|
||||||
|
|
Loading…
Reference in a new issue