Added flamelink features
This commit is contained in:
parent
1e61914815
commit
9556e0eb99
|
@ -1,10 +1,11 @@
|
||||||
import React, { Component } from 'react';
|
import { Component } from 'react';
|
||||||
|
import flamelinkApp from '../flamelink.js';
|
||||||
|
|
||||||
class Flamelink extends Component {
|
class Flamelink extends Component {
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
//Grabs data from text field in entry from the martenSchemaDemo
|
//Grabs data from text field in entry from the martenSchemaDemo
|
||||||
this.props.flamelinkApp.content.get('martenSchemaDemo')
|
flamelinkApp.content.get('martenSchemaDemo')
|
||||||
.then(flameData => document.getElementById("flamelinkDemo").innerHTML = flameData.field_1538162314419);
|
.then(flameData => document.getElementById("flamelinkDemo").innerHTML = flameData.field_1538162314419);
|
||||||
|
|
||||||
return(null);
|
return(null);
|
||||||
|
|
|
@ -11,7 +11,6 @@ import Quiz from '../pages/Quiz';
|
||||||
import SightingList from '../pages/SightingList';
|
import SightingList from '../pages/SightingList';
|
||||||
import Report from '../pages/Report';
|
import Report from '../pages/Report';
|
||||||
import Info from '../pages/Info';
|
import Info from '../pages/Info';
|
||||||
import flamelink from 'flamelink';
|
|
||||||
|
|
||||||
function TabContainer(props) {
|
function TabContainer(props) {
|
||||||
return (
|
return (
|
||||||
|
@ -32,15 +31,6 @@ const styles = theme => ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const flamelinkApp = flamelink({
|
|
||||||
apiKey: "AIzaSyAYf9AbeYwLY892NRiQfn0AMtG9xIFAJbo",
|
|
||||||
authDomain: "marten-application.firebaseapp.com",
|
|
||||||
databaseURL: "https://marten-application.firebaseio.com",
|
|
||||||
projectId: "marten-application",
|
|
||||||
storageBucket: "marten-application.appspot.com",
|
|
||||||
messagingSenderId: "659856510832"
|
|
||||||
});
|
|
||||||
|
|
||||||
class SimpleTabs extends React.Component {
|
class SimpleTabs extends React.Component {
|
||||||
state = {
|
state = {
|
||||||
value: 0,
|
value: 0,
|
||||||
|
@ -71,7 +61,7 @@ class SimpleTabs extends React.Component {
|
||||||
{value === 2 && <SightingList/>}
|
{value === 2 && <SightingList/>}
|
||||||
{value === 3 && <Quiz/>}
|
{value === 3 && <Quiz/>}
|
||||||
{value === 4 && <ViewMap/>}
|
{value === 4 && <ViewMap/>}
|
||||||
{value === 5 && <Info flamelinkApp={flamelinkApp}/>}
|
{value === 5 && <Info/>}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,4 +11,5 @@ const config = {
|
||||||
};
|
};
|
||||||
|
|
||||||
firebase.initializeApp(config);
|
firebase.initializeApp(config);
|
||||||
|
|
||||||
export default firebase;
|
export default firebase;
|
|
@ -0,0 +1,6 @@
|
||||||
|
import firebaseApp from './firebase.js';
|
||||||
|
import flamelink from 'flamelink';
|
||||||
|
|
||||||
|
const flamelinkApp = flamelink({ firebaseApp });
|
||||||
|
|
||||||
|
export default flamelinkApp;
|
Loading…
Reference in New Issue