Initial commit

This commit is contained in:
MrFry 2020-03-07 08:09:01 +01:00
commit d0a48513e9
28 changed files with 724 additions and 0 deletions

View file

@ -0,0 +1,49 @@
import React, { PureComponent } from 'react'
import LoadingIndicator from '../LoadingIndicator'
import constants from '../../constants.json'
import './Manual.css'
class Manual extends PureComponent {
constructor (props) {
super(props)
this.state = {
loaded: false
}
console.info('Fetching manual')
fetch(`${constants.serverUrl}manual`) // eslint-disable-line
.then((resp) => {
return resp.text()
})
.then((data) => {
this.manual = {
__html: data
}
this.setState({
loaded: true
})
})
}
render () {
const { loaded } = this.state
if (loaded) {
return (
<div>
<div dangerouslySetInnerHTML={this.manual} />
</div>
)
} else {
return (
<LoadingIndicator />
)
}
}
}
export default Manual