Added FlameLink to Homepage.

This commit is contained in:
ajmaley 2018-11-01 21:19:34 -04:00
parent 035608a19b
commit 4fba3db3db
1 changed files with 20 additions and 1 deletions

View File

@ -1,7 +1,23 @@
import React, { Component } from 'react';
import React, { Component, Fragment } from 'react';
import Typography from '@material-ui/core/Typography';
import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations';
import flamelinkApp from '../flamelink.js';
class Home extends Component {
constructor() {
super();
global.schemaName = 'martenInfo';
this.state = {
schemaDetails: '',
}
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options' ] })
.then(result => this.setState({
schemaDetails: result
}))
}
render() {
return (
@ -9,6 +25,9 @@ class Home extends Component {
<Typography variant='display1' align='center' gutterBottom>
Home
</Typography>
<Fragment>
<FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails}/>
</Fragment>
</div>
);
}