Fixed merge conflict.

This commit is contained in:
WildScotsmen
2018-11-25 17:44:25 -05:00
18 changed files with 638 additions and 90 deletions

43
src/pages/About.js Normal file
View File

@@ -0,0 +1,43 @@
import React, { Component, Fragment } from 'react';
import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations';
import flamelinkApp from '../flamelink.js';
class About extends Component {
constructor() {
super();
global.schemaName = 'martenAbout';
this.state = {
schemaDetails: '',
schemaType: '',
}
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options' ] })
.then(result => this.setState({
schemaDetails: result
}))
flamelinkApp.schemas.get(global.schemaName)
.then(result => this.setState({
schemaType: result.type
}))
}
componentDidMount() {
document.title = 'Marten Tracker | About';
}
render() {
return (
<div>
<Fragment>
<FlameLinkComponentCreations schemaDetails = {this.state.schemaDetails} schemaType = {this.state.schemaType}/>
</Fragment>
</div>
);
}
}
export default About;

View File

@@ -1,6 +1,8 @@
import React, { Component } from 'react';
import FlameLinkComponentCreations from '../components/FlameLinkComponentCreations';
import FlameLinkCollectionGallery from '../components/FlameLinkCollectionGallery';
import flamelinkApp from '../flamelink';
import Grid from '@material-ui/core/Grid';
class Home extends Component {
constructor() {
@@ -10,12 +12,18 @@ class Home extends Component {
this.state = {
schemaDetails: '',
schemaType: '',
}
flamelinkApp.schemas.getFields(global.schemaName, { fields: ['title', 'key', 'type', 'gridColumns', 'description', 'options'] })
flamelinkApp.schemas.getFields(global.schemaName, { fields: [ 'title', 'key', 'type', 'gridColumns', 'description', 'options'] })
.then(result => this.setState({
schemaDetails: result
}))
flamelinkApp.schemas.get(global.schemaName)
.then(result => this.setState({
schemaType: result.type
}))
}
componentDidMount() {
@@ -24,7 +32,10 @@ class Home extends Component {
render() {
return (
<FlameLinkComponentCreations schemaDetails={this.state.schemaDetails} />
<Grid container>
<FlameLinkCollectionGallery galleryName={'martenHomeGallery'} showTitle={false}/>
<FlameLinkComponentCreations schemaDetails={this.state.schemaDetails} schemaType = {this.state.schemaType}/>
</Grid>
);
}
}