2018-11-13 00:03:00 +00:00
|
|
|
import React, { Component, Fragment } from 'react';
|
|
|
|
import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations';
|
|
|
|
import flamelinkApp from '../flamelink.js';
|
|
|
|
|
|
|
|
class About extends Component {
|
|
|
|
constructor() {
|
|
|
|
super();
|
|
|
|
|
2018-11-23 18:07:42 +00:00
|
|
|
global.schemaName = 'martenAbout';
|
2018-11-13 00:03:00 +00:00
|
|
|
|
|
|
|
this.state = {
|
|
|
|
schemaDetails: '',
|
2018-11-23 18:07:42 +00:00
|
|
|
schemaType: '',
|
2018-11-13 00:03:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options' ] })
|
|
|
|
.then(result => this.setState({
|
|
|
|
schemaDetails: result
|
|
|
|
}))
|
2018-11-23 18:07:42 +00:00
|
|
|
|
|
|
|
flamelinkApp.schemas.get(global.schemaName)
|
|
|
|
.then(result => this.setState({
|
|
|
|
schemaType: result.type
|
|
|
|
}))
|
|
|
|
}
|
2018-11-13 00:03:00 +00:00
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
|
|
|
<Fragment>
|
2018-11-23 18:07:42 +00:00
|
|
|
<FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails} schemaType = {this.state.schemaType}/>
|
2018-11-13 00:03:00 +00:00
|
|
|
</Fragment>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default About;
|