rats-search/src/app/changelog-page.js
Alexey Kasyanchuk fd4ba2c392 fix eslint
2018-06-18 00:06:28 +03:00

27 lines
599 B
JavaScript

import React from 'react';
import Page from './page';
import ReactMarkdown from 'react-markdown'
import fs from 'fs'
export default class ChangeLog extends Page {
constructor(props) {
super(props)
this.setTitle('Changelog');
let changelogPath = 'CHANGELOG.md'
if(!fs.existsSync(changelogPath))
changelogPath = 'resources/CHANGELOG.md'
this.changelog = fs.readFileSync(changelogPath)
if(!this.changelog)
throw new Error('no changelog file')
}
render() {
return (
<div className='pad0-75'>
<ReactMarkdown skipHtml={true} source={this.changelog} />
</div>
);
}
}