24 lines
581 B
JavaScript
24 lines
581 B
JavaScript
import React from 'react';
|
|
import 'github-markdown-css'
|
|
import ReactMarkdown from 'react-markdown';
|
|
import AboutMarkdown from '../static/about.md';
|
|
|
|
class About extends React.Component {
|
|
state = { about: '' };
|
|
|
|
componentDidMount() {
|
|
fetch(AboutMarkdown).then(res => res.text()).then(text => this.setState({ markdown: text }));
|
|
}
|
|
|
|
render () {
|
|
const { markdown } = this.state;
|
|
return (
|
|
<div className="markdown-body">
|
|
<ReactMarkdown source={markdown} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|
|
|
|
export default About;
|