Added code to handle flamelink data. It handles schema field order, grid sizes and displays text. Getting storage bucket errors when attempting to grab media info. Need to use the firebase-admin package instead of the firebase package. This is a known issue with flamelink. I'll fix this shortly.

This commit is contained in:
ajmaley
2018-10-27 12:46:00 -04:00
parent e7052dfb5b
commit 7a8e840e1b
4 changed files with 34 additions and 70 deletions

View File

@@ -1,9 +1,22 @@
import React, { Component } from 'react';
import React, { Component, Fragment } from 'react';
import Typography from '@material-ui/core/Typography';
import Flamelink from '../components/Flamelink';
import Layout from '../components/Layout';
import flamelinkApp from '../flamelink.js';
class Info extends Component {
constructor() {
super();
this.state = {
schemaDetails: '',
}
flamelinkApp.schemas.getFields('martenSchemaDemo', { fields: [ 'title', 'key', 'type', 'gridColumns' ] })
.then(result => this.setState({
schemaDetails: result
}))
}
render() {
return (
@@ -12,7 +25,10 @@ class Info extends Component {
<Typography variant='display1' align='center' gutterBottom>
Info
</Typography>
<Flamelink/>
<Fragment>
<Layout schemaDetails = {this.state.schemaDetails}/>
</Fragment>
</div>
);